Lead integrity and closed-loop algorithm diagnostic

ABSTRACT

In one example, the disclosure describes a method comprising receiving, by processing circuitry, information indicative of one or more evoked compound action potential (ECAP) signals. The one or more ECAP signals are sensed by at least one electrode carried by a medical lead. The processing circuitry determining that at least one characteristic value of the one or more ECAP signals is outside of an expected range. Responsive to determining that the at least one characteristic value of the one or more ECAP signals is outside of the expected range, the processing circuitry performs a lead integrity test for the medical lead.

This application is a continuation of U.S. Pat. Application No.16/948,748, filed Sep. 30, 2020, the entire contents of which isincorporated herein by reference.

TECHNICAL FIELD

This disclosure generally relates to electrical stimulation therapy, andmore specifically, control of electrical stimulation therapy.

BACKGROUND

Medical devices may be external or implanted and may be used to deliverelectrical stimulation therapy to patients via various tissue sites totreat a variety of symptoms or conditions such as chronic pain, tremor,Parkinson’s disease, epilepsy, urinary or fecal incontinence, sexualdysfunction, obesity, or gastroparesis. A medical device may deliverelectrical stimulation therapy via one or more leads that includeelectrodes located proximate to target locations associated with thebrain, the spinal cord, pelvic nerves, peripheral nerves, or thegastrointestinal tract of a patient. Stimulation proximate the spinalcord, proximate the sacral nerve, within the brain, and proximateperipheral nerves are often referred to as spinal cord stimulation(SCS), sacral neuromodulation (SNM), deep brain stimulation (DBS), andperipheral nerve stimulation (PNS), respectively.

SUMMARY

In general, the disclosure is directed to devices, systems, andtechniques for controlling electrical stimulation therapy based onsensing artifacts of at least one of stimulation signals or evokedcompound action potentials (ECAPs). A medical device (e.g., animplantable medical device) may deliver one or more stimulation signals(e.g., one or more pulses) to the patient via one or more leads, and themedical device may sense signals which may include respective ECAPselicited by the pulses. The medical device may also sense ECAP signalselicited by a delivered pulse if the delivered pulse causes a sufficientnumber of nerve fibers to depolarize.

Examples of the present disclosure generally relate to identifyingissues that may occur during closed-loop stimulation, where the systememploys ECAP signals in a closed-loop system to adjust one or morestimulation parameters that define subsequent stimulation pulses inelectrical stimulation therapy. The issues may relate to medical leadintegrity issues and/or noise interference (e.g., electromagneticinterference EMI) that may cause problems with properly detecting and/orrecording ECAPs, which in turn affect the closed-loop stimulationability to properly administer a patient’s therapy. Therefore, thesystem may determine whether or not the detected signals arerepresentative of expected ECAP signals and, if not expected, initiate alead integrity test to identify the cause of the unexpected signals.

In one example, the disclosure relates to a method comprising receiving,by processing circuitry, information indicative of one or more evokedcompound action potential (ECAP) signals. The one or more ECAP signalsare sensed by at least one electrode carried by a medical lead. Theprocessing circuitry determining that at least one characteristic valueof the one or more ECAP signals is outside of an expected range.Responsive to determining that the at least one characteristic value ofthe one or more ECAP signals is outside of the expected range, theprocessing circuitry performs a lead integrity test for the medicallead.

In some examples, the disclosure relates to a medical device comprisingstimulation generation circuitry configured to deliver a firststimulation pulse to a patient. Sensing circuitry of the medical deviceis configured to sense information indicative of one or more evokedcompound action potential (ECAP) signals, where the sensing circuitrycomprises at least one electrode carried by a medical lead. Processingcircuitry of the medical device is configured to receive informationindicative of the one or more ECAP signals sensed by the at least oneelectrode carried by the medical lead. The processing circuitrydetermines that at least one characteristic value of the one or moreECAP signals is outside of an expected range. Responsive to determiningthat the at least one characteristic value of the one or more ECAPsignals is outside of the expected range, the processing circuitryperforms a lead integrity test for the medical lead.

In some examples, a computer-readable storage medium comprisesinstructions that, when executed, cause processing circuitry to receiveinformation indicative of one or more evoked compound action potential(ECAP) signals. The one or more ECAP signals are sensed by at least oneelectrode carried by a medical lead. The processing circuitry determinesthat at least one characteristic value of the one or more ECAP signalsis outside of an expected range. Based on the determination that the atleast one characteristic value of the one or more ECAP signals isoutside of the expected range, the processing circuitry performs a leadintegrity test for the medical lead.

The summary is intended to provide an overview of the subject matterdescribed in this disclosure. It is not intended to provide an exclusiveor exhaustive explanation of the systems, device, and methods describedin detail within the accompanying drawings and description below.Further details of one or more examples of this disclosure are set forthin the accompanying drawings and in the description below. Otherfeatures, objects, and advantages will be apparent from the descriptionand drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an example system thatincludes an implantable medical device (IMD) configured to deliverspinal cord stimulation (SCS) therapy and an external programmer, inaccordance with one or more techniques of this disclosure.

FIG. 2 is a block diagram illustrating an example configuration ofcomponents of the IMD of FIG. 1 , in accordance with one or moretechniques of this disclosure.

FIG. 3 is a block diagram illustrating an example configuration ofcomponents of the external programmer of FIG. 1 , in accordance with oneor more techniques of this disclosure.

FIG. 4 is a graph 402 of example evoked compound action potentials(ECAPs) sensed for respective stimulation pulses, in accordance with oneor more techniques of this disclosure.

FIG. 5 is an example timing diagram illustrating an example ofelectrical stimulation pulses, respective stimulation signals, andrespective sensed ECAPs, in accordance with one or more techniques ofthis disclosure.

FIG. 6 is a flow diagram illustrating an example operation forcontrolling stimulation based on one or more ECAP signals, in accordancewith one or more techniques of this disclosure.

FIG. 7 is a flow diagram illustrating an example operation of anauto-triggered diagnostic based on one or more ECAP signals, inaccordance with one or more techniques of this disclosure.

FIG. 8 is a flow diagram illustrating an example operation for anauto-triggered diagnostic based upon ECAP data, in accordance with oneor more techniques of this disclosure.

FIG. 9 is a flow diagram illustrating an example operation for anauto-triggered diagnostic based on ECAP data, in accordance with one ormore techniques of this disclosure.

FIG. 10 is a flow diagram illustrating an example method forautomatically performing lead integrity testing according to examples ofthe present disclosure.

Like reference characters denote like elements throughout thedescription and figures.

DETAILED DESCRIPTION

The disclosure describes examples of medical devices, systems, andtechniques for auto triggering a lead integrity test based on sensedelectrical signals. A system may identify and employ ECAP data todetermine the effectiveness of electrical stimulation therapy. Forexample, the system may use the ECAP data as feedback in a closed-loopcontrol algorithm that controls values of one or more stimulationparameters that at least partially define subsequently deliveredstimulation. For example, the system may increase stimulation amplitudein response to determining that an amplitude of an ECAP signal dropsbelow a target ECAP amplitude. However, external noise or internal noiseaffecting the sensing of ECAP signals may reduce the effectiveness ofthe closed-loop control algorithm. For example, external noise (e.g.,electromagnetic interference (EMI) producing appliances such asmicrowave ovens, ignition systems, cellular network of mobile phones,lightning, solar flares, and auroras) picked up by recording electrodesmay prevent identification of ECAP signals. As another example, internalnoise, such as lead integrity issues (e.g., a fractured conductor in thelead, short circuit, integrated circuit problem, or other open circuit),may prevent the detection of ECAP signals. These external or internalnoise issues may prevent appropriate ECAP signal measurements and causethe closed-loop control algorithm to not function properly for thepatient.

As described herein, devices, systems, and techniques can identifypotential problems with ECAP signal detection and mitigate thoseproblems or their effects on the closed-loop control algorithm based onECAP signals. In one example, a system may compare sensed electricalsignals typically used to sense ECAP signals to an expected range ofvalues. For example, the system may expect that one or morecharacteristic values of the ECAP signal should be within an expectedrange such as between certain values, below a certain value, or above acertain value. In some examples, the system may determine whether theone or more characteristics of the ECAP signals does not change over aperiod of time when typical ECAP signals would change. In some examples,the system may compare characteristics of sensed ECAP signals to storedbaseline ECAP data. The system may also normalize the ECAPcharacteristic values based on sensed accelerometer data so that ECAPcharacteristic values are appropriate for different postures the usermay be in (e.g., lying, sitting, or standing).

In response to determining that one or more characteristics of the ECAPsignals are outside of the expected range, the system may perform one ormore actions to mitigate stimulation therapy issues that may result whenusing the ECAP signals as a basis for the closed-loop control algorithm.For example, the system may initiate a lead integrity test (on all or asubset of electrodes of the lead) to determine if there are any opencircuits that may be causing noise or a lack of signal amplitude thatprevents ECAP signal detection. The system may also suspend closed-loopadjustment of stimulation therapy in response to detecting that the ECAPsignals are outside of the expected range. This suspension may preventthe system from increasing stimulation amplitude or other parametercaused by the lack of ECAP signals due to an open circuit in sensing,for example. If the lead, or subset of circuits of the lead, pass thelead integrity test, the system may simply temporarily suspendclosed-loop stimulation adjustment until the noise in the ECAP signalsis no longer detected. If the lead, or subset of circuits of the lead,fail the lead integrity test, the system may suspend or otherwise stopclosed-loop stimulation until the system, or a user, reconfigures one ormore parameters that defines the closed-loop control algorithm (e.g.,using different sensing electrodes or other sensing parameters). In thismanner, the system may prevent noise or other issues from causingunintended changes to stimulation therapy and take action to correctthose issues for subsequent therapy.

FIG. 1 is a conceptual diagram illustrating an example system 100 thatincludes an implantable medical device (IMD) 110 configured to deliverspinal cord stimulation (SCS) therapy and an external programmer 150, inaccordance with one or more techniques of this disclosure. Although thetechniques described in this disclosure are generally applicable to avariety of medical devices including external devices and IMDs,application of such techniques to IMDs and, more particularly,implantable electrical stimulators (e.g., neurostimulators) will bedescribed for purposes of illustration. More particularly, thedisclosure will refer to an implantable SCS system for purposes ofillustration, but without limitation as to other types of medicaldevices or other therapeutic applications of medical devices.

As shown in FIG. 1 , system 100 includes an IMD 110, leads 130A and130B, and external programmer 150 shown in conjunction with a patient105, who is ordinarily a human patient. In the example of FIG. 1 , IMD110 is an implantable electrical stimulator that is configured togenerate and deliver electrical stimulation therapy to patient 105 viaone or more electrodes of leads 130A and/or 130B (collectively, “leads130”), e.g., for relief of chronic pain or other symptoms. In otherexamples, IMD 110 may be coupled to a single lead carrying multipleelectrodes or more than two leads each carrying multiple electrodes.This electrical stimulation may be delivered in the form of stimulationpulses. In some examples, IMD 110 may be configured to generate anddeliver stimulation pulses to include control pulses configured toelicit ECAP signals. The control pulses may or may not contribute totherapy in some examples. In some examples, IMD 110 may, in addition tocontrol pulses, deliver informed pulses that contribute to the therapyfor the patient, but which do not elicit detectable ECAPs. IMD 110 maybe a chronic electrical stimulator that remains implanted within patient105 for weeks, months, or even years. In other examples, IMD 110 may bea temporary, or trial, stimulator used to screen or evaluate theefficacy of electrical stimulation for chronic therapy. In one example,IMD 110 is implanted within patient 105, while in another example, IMD110 is an external device coupled to percutaneously implanted leads. Insome examples, IMD 110 uses one or more leads, while in other examples,IMD 110 is leadless.

IMD 110 may be constructed of any polymer, metal, or composite materialsufficient to house the components of IMD 110 (e.g., componentsillustrated in FIG. 2 ) within patient 105. In this example, IMD 110 maybe constructed with a biocompatible housing, such as titanium orstainless steel, or a polymeric material such as silicone, polyurethane,or a liquid crystal polymer, and surgically implanted at a site inpatient 105 near the pelvis, abdomen, or buttocks. In other examples,IMD 110 may be implanted within other suitable sites within patient 105,which may depend, for example, on the target site within patient 105 forthe delivery of electrical stimulation therapy. The outer housing of IMD110 may be configured to provide a hermetic seal for components, such asa rechargeable or non-rechargeable power source. In addition, in someexamples, the outer housing of IMD 110 is selected from a material thatfacilitates receiving energy to charge the rechargeable power source.

Electrical stimulation energy, which may be constant current or constantvoltage-based pulses, for example, is delivered from IMD 110 to one ormore target tissue sites of patient 105 via one or more electrodes (notshown) of implantable leads 130. In the example of FIG. 1 , leads 130carry electrodes that are placed adjacent to the target tissue of spinalcord 120. One or more of the electrodes may be disposed at a distal tipof a leads 130 and/or at other positions at intermediate points alongthe lead. Leads 130 may be implanted and coupled to IMD 110. Theelectrodes may transfer electrical stimulation generated by anelectrical stimulation generator in IMD 110 to tissue of patient 105.Although leads 130 may each be a single lead, leads 130 may include alead extension or other segments that may aid in implantation orpositioning of leads 130. In some other examples, IMD 110 may be aleadless stimulator with one or more arrays of electrodes arranged on ahousing of the stimulator rather than leads that extend from thehousing. In addition, in some other examples, system 100 may include onelead or more than two leads, each coupled to IMD 110 and directed tosimilar or different target tissue sites.

The electrodes of leads 130 may be electrode pads on a paddle lead,circular (e.g., ring) electrodes surrounding the body of the lead,conformable electrodes, cuff electrodes, segmented electrodes (e.g.,electrodes disposed at different circumferential positions around thelead instead of a continuous ring electrode), any combination thereof(e.g., ring electrodes and segmented electrodes) or any other type ofelectrodes capable of forming unipolar, bipolar or multipolar electrodecombinations for therapy. Ring electrodes arranged at different axialpositions at the distal ends of lead 130 may be described for purposesof illustration.

The deployment of electrodes via leads 130 is described for purposes ofillustration, but arrays of electrodes may be deployed in differentways. For example, a housing associated with a leadless stimulator maycarry arrays of electrodes, e.g., rows and/or columns (or otherpatterns), to which shifting operations may be applied. Such electrodesmay be arranged as surface electrodes, ring electrodes, or protrusions.As a further alternative, electrode arrays may be formed by rows and/orcolumns of electrodes on one or more paddle leads. In some examples,electrode arrays include electrode segments, which are arranged atrespective positions around a periphery of a lead, e.g., arranged in theform of one or more segmented rings around a circumference of acylindrical lead. In other examples, one or more of leads 130 are linearleads having 8 ring electrodes along the axial length of the lead. Inanother example, the electrodes are segmented rings arranged in a linearfashion along the axial length of the lead and at the periphery of thelead.

The stimulation parameter of a therapy stimulation program that definesthe stimulation pulses of electrical stimulation therapy by IMD 110through the electrodes of leads 130 may include information identifyingwhich electrodes have been selected for delivery of stimulationaccording to a stimulation program, the polarities of the selectedelectrodes, i.e., the electrode combination for the program, and voltageor current amplitude, pulse frequency, pulse width, pulse shape ofstimulation delivered by the electrodes. These stimulation parameters ofstimulation pulses (e.g., control pulses and/or informed pulses) aretypically predetermined parameter values determined prior to delivery ofthe stimulation pulses (e.g., set according to a stimulation program).However, in some examples, system 100 changes one or more parametervalues automatically based on one or more factors or based on userinput.

A closed-loop stimulation program (e.g., a closed-loop controlalgorithm) may define, based on one or more feedback variables (e.g.,one or more characteristics of an ECAP signal), stimulation parametervalues that define stimulation pulses (e.g., control pulses and/orinformed pulses) delivered by IMD 110 through at least some of theelectrodes of leads 130. These stimulation parameter values may includeinformation identifying which electrodes have been selected for deliveryof stimulation pulses, the polarities of the selected electrodes, i.e.,the electrode combination for the program, and voltage or currentamplitude, pulse frequency, pulse width, and pulse shape of stimulationdelivered by the electrodes. The stimulation signals (e.g., one or morestimulation pulses or a continuous stimulation waveform) defined by theparameters of the closed-loop stimulation program are configured toevoke a compound action potential (e.g., an ECAP signal) from nerves, inthe example of control pulses, or contribute to therapy of the patient,in the example of informed pulses. In some examples, the closed-loopstimulation program defines the amplitude of the control and/or informedpulses in response to one or more characteristics of the ECAP signal.For example, an increased amplitude of the ECAP signal may cause theclosed-loop stimulation program to reduce the amplitude of the informedpulses and/or control pulses. In other examples, the closed-loopstimulation program may define other parameter values, such as pulsefrequency, pulse width, inter-pulse intervals, etc., based on the one ormore characteristics of the ECAP signal. In some examples, theadjustments to a parameter of the informed pulses may be tied to (e.g.,as a ratio) the same parameter of the control pulses. In some examples,a closed-loop stimulation program may adjust parameter values thatdefine pulses that may, or may not, contribute to therapy for thepatient. A single closed-loop stimulation program may control one ormore parameter values that define control pulses and informed pulses. Inother examples, one closed-loop stimulation program may controlparameter values of control pulses while a different closed-loopstimulation program may control parameter values of informed pulses.

Although FIG. 1 is directed to SCS therapy, e.g., used to treat pain, inother examples, system 100 may be configured to treat any othercondition that may benefit from electrical stimulation therapy. Forexample, system 100 may be used to treat tremor, Parkinson’s disease,epilepsy, a pelvic floor disorder (e.g., urinary incontinence or otherbladder dysfunction, fecal incontinence, pelvic pain, bowel dysfunction,or sexual dysfunction), obesity, gastroparesis, or psychiatric disorders(e.g., depression, mania, obsessive compulsive disorder, anxietydisorders, and the like). In this manner, system 100 may be configuredto provide therapy taking the form of deep brain stimulation (DBS),peripheral nerve stimulation (PNS), peripheral nerve field stimulation(PNFS), cortical stimulation (CS), pelvic floor stimulation,gastrointestinal stimulation, or any other stimulation therapy capableof treating a condition of patient 105.

In some examples, leads 130 includes one or more sensors configured toallow IMD 110 to monitor one or more parameters of patient 105, such aspatient activity, pressure, temperature, or other characteristics. Theone or more sensors may be provided in addition to, or in place of,therapy delivery by leads 130.

IMD 110 is configured to deliver electrical stimulation therapy topatient 105 via selected combinations of electrodes carried by one orboth of leads 130, alone or in combination with an electrode carried byor defined by an outer housing of IMD 110. The target tissue for theelectrical stimulation therapy may be any tissue affected by electricalstimulation, which may be in the form of electrical stimulation pulsesor continuous waveforms. In some examples, the target tissue includesnerves, smooth muscle or skeletal muscle. In the example illustrated byFIG. 1 , the target tissue is tissue proximate spinal cord 120, such aswithin an intrathecal space or epidural space of spinal cord 120, or, insome examples, adjacent nerves that branch off spinal cord 120. Leads130 may be introduced into spinal cord 120 via any suitable region, suchas the thoracic, cervical or lumbar regions. Stimulation of spinal cord120 may, for example, prevent pain signals from traveling through spinalcord 120 and to the brain of patient 105. Patient 105 may perceive theinterruption of pain signals as a reduction in pain and, therefore,efficacious therapy results. In other examples, stimulation of spinalcord 120 may produce paresthesia which may reduce the perception of painby patient 105, and thus, provide efficacious therapy results.

IMD 110 generates and delivers electrical stimulation therapy to atarget stimulation site within patient 105 via the electrodes of leads130 to patient 105 according to one or more therapy stimulationprograms. A therapy stimulation program defines values for one or moreparameters that define an aspect of the therapy delivered by IMD 110according to that program. For example, a therapy stimulation programthat controls delivery of stimulation by IMD 110 in the form of pulsesmay define values for voltage or current pulse amplitude, pulse width,and pulse rate (e.g., pulse frequency) for stimulation pulses deliveredby IMD 110 according to that program.

In some examples where ECAP signals cannot be detected from the types ofpulses intended to be delivered to provide therapy to the patient,control pulses and informed pulses may be delivered. For example, IMD110 is configured to deliver control stimulation to patient 105 via acombination of electrodes of leads 130, alone or in combination with anelectrode carried by or defined by an outer housing of IMD 110. Thetissue targeted by the control stimulation may be the same tissuetargeted by the electrical stimulation therapy, but IMD 110 may delivercontrol stimulation pulses via the same, at least some of the same, ordifferent electrodes. Since control stimulation pulses are delivered inan interleaved manner with informed pulses, a clinician and/or user mayselect any desired electrode combination for informed pulses. Like theelectrical stimulation therapy, the control stimulation may be in theform of electrical stimulation pulses or continuous waveforms.

In one example, each control stimulation pulse may include a balanced,bi-phasic square pulse that employs an active recharge phase. However,in other examples, the control stimulation pulses may include amonophasic pulse followed by a passive recharge phase. In otherexamples, a control pulse may include an imbalanced bi-phasic portionand a passive recharge portion. In other examples, a control stimulationpulse may include a tri-phasic pulse or pulse having more than threephases. Although not necessary, a bi-phasic control pulse may include aninterphase interval between the positive and negative phase to promotepropagation of the nerve impulse in response to the first phase of thebi-phasic pulse. The control stimulation may be delivered withoutinterrupting the delivery of the electrical stimulation informed pulses,such as during the window between consecutive informed pulses. In somecases, the control pulses may elicit an ECAP signal from the tissue, andIMD 110 may sense the ECAP signal via two or more electrodes on leads130. In some examples, control pulses might not elicit ECAPs that aredetectible by IMD 110, however IMD 110 may detect stimulation signalsresponsive to the control pulses. The control pulses (e.g., detectedstimulation signals) may include information that is useful fordetermining parameters of one or more stimulation delivered to patient105. In cases where the control stimulation pulses are applied to spinalcord 120, the signal may be sensed by IMD 110 from spinal cord 120.

IMD 110 may deliver control stimulation to a target stimulation sitewithin patient 105 via the electrodes of leads 130 according to one ormore closed-loop stimulation programs. The one or more closed-loopstimulation programs may be stored in a storage device of IMD 110. Eachclosed-loop program of the one or more closed-loop stimulation programsincludes values for one or more parameters that define an aspect of thecontrol stimulation delivered by IMD 110 according to that program, suchas current or voltage amplitude, pulse width, pulse frequency, electrodecombination, and, in some examples, timing based on informed pulses tobe delivered to patient 105. In some examples, IMD 110 delivers controlstimulation to patient 105 according to multiple closed-loop stimulationprograms.

A user, such as a clinician or patient 105, may interact with a userinterface of an external programmer 150 to program IMD 110. Programmingof IMD 110 may refer generally to the generation and transfer ofcommands, programs, or other information to control the operation of IMD110. In this manner, IMD 110 may receive the transferred commands andprograms from external programmer 150 to control electrical stimulationtherapy (e.g., informed pulses) and control stimulation (e.g., controlpulses). For example, external programmer 150 may transmit therapystimulation programs, closed-loop stimulation programs, stimulationparameter adjustments, therapy stimulation program selections,closed-loop program selections, user input, or other information tocontrol the operation of IMD 110, e.g., by wireless telemetry or wiredconnection. As described herein, stimulation delivered to patient 105may include control pulses, and, in some examples, stimulation mayinclude control pulses and informed pulses.

In some cases, external programmer 150 may be characterized as aphysician or clinician programmer if it is primarily intended for use bya physician or clinician. In other cases, external programmer 150 may becharacterized as a patient programmer if it is primarily intended foruse by a patient (e.g., for home use). A patient programmer may begenerally accessible to patient 105 and, in many cases, may be aportable device that may accompany patient 105 throughout the patient’sdaily routine. For example, a patient programmer may receive input frompatient 105 when patient 105 wishes to terminate or change electricalstimulation therapy. In general, a physician or clinician programmer maysupport selection and generation of programs by a clinician for use byIMD 110, whereas a patient programmer may support adjustment andselection of such programs by a patient during ordinary use. In otherexamples, external programmer 150 may include, or be part of, anexternal charging device that recharges a power source of IMD 110. Inthis manner, a user may program and charge IMD 110 using one device, ormultiple devices.

As described herein, information may be transmitted between externalprogrammer 150 and IMD 110. Therefore, IMD 110 and external programmer150 may communicate via wireless communication using any techniquesknown in the art. Examples of communication techniques may include, forexample, radiofrequency (RF) telemetry and inductive coupling, but othertechniques are also contemplated. In some examples, external programmer150 includes a communication head that may be placed proximate to thepatient’s body near the IMD 110 implant site to improve the quality orsecurity of communication between IMD 110 and external programmer 150.Communication between external programmer 150 and IMD 110 may occurduring power transmission or separate from power transmission.

In some examples, IMD 110, in response to commands from externalprogrammer 150, delivers electrical stimulation therapy according to aplurality of therapy stimulation programs to a target tissue site of thespinal cord 120 of patient 105 via electrodes (not depicted) on leads130. In some examples, IMD 110 modifies therapy stimulation programs astherapy needs of patient 105 evolve over time. For example, themodification of the therapy stimulation programs may cause theadjustment of at least one parameter of the plurality of informedpulses. When patient 105 receives the same therapy for an extendedperiod, the efficacy of the therapy may be reduced. In some cases,parameters of the plurality of informed pulses may be automaticallyupdated.

Efficacy of electrical stimulation therapy may, in some cases, beindicated by one or more characteristics (e.g. an amplitude of orbetween one or more peaks or an area under the curve of one or morepeaks) of an action potential that is evoked by a stimulation pulsedelivered by IMD 110 (i.e., a characteristic of the ECAP signal).Additionally, or alternatively, efficacy of electrical stimulationtherapy may be indicated by one or more characteristics (e.g., a voltagemagnitude) of a stimulation signal that is sensed (e.g., the sensedstimulation pulse delivered by IMD 110). The stimulation signal may berepresentative of the delivered stimulation pulse and related signalsinstead of action potentials evoked by the delivered stimulation pulse.

In one or more cases where stimulation pulses elicit detectible ECAPs,electrical stimulation therapy delivery by leads 130 of IMD 110 maycause neurons within the target tissue to evoke a compound actionpotential that travels up and down the target tissue (e.g., nervefibers), eventually arriving at sensing electrodes of IMD 110.Furthermore, control stimulation may also elicit at least one ECAP, andECAPs responsive to control stimulation may also be a surrogate for theeffectiveness of the therapy. The amount of action potentials (e.g.,number of neurons propagating action potential signals) that are evokedmay be based on the various parameters of electrical stimulation pulsessuch as amplitude, pulse width, frequency, pulse shape (e.g., slew rateat the beginning and/or end of the pulse), etc. The slew rate may definethe rate of change of the voltage and/or current amplitude of the pulseat the beginning and/or end of each pulse or each phase within thepulse. For example, a very high slew rate indicates a steep or even nearvertical edge of the pulse, and a low slew rate indicates a longer rampup (or ramp down) in the amplitude of the pulse. In some examples, theseparameters contribute to an intensity of the electrical stimulation. Inaddition, a characteristic of the ECAP signal (e.g., an amplitude) maychange based on the distance between the stimulation electrodes and thenerves subject to the electrical field produced by the delivered controlstimulation pulses.

Additionally, or alternatively, the target ECAP value (e.g., theexpected range) of characteristic values of the ECAP signal may dependon a posture of patient 105. For example, IMD 110 may include anaccelerometer (not illustrated in FIG. 1 ) which is configured togenerate an accelerometer signal. IMD 110 may be configured todetermine, based on the accelerometer signal, a posture of patient 105.The determined posture may be a posture of a set of postures including astanding posture, a seated posture, a supine posture, a prone posture,and a side-lying posture, as examples. IMD 110 may be configured toselect the expected range of characteristic values of a ECAP signalbased on the determined posture of patient 105. As discussed above, insome examples, the IMD 110 may be configured to select the target ECAPvalue of the ECAP signal based on a magnitude of the stimulation pulsewhich causes IMD 110 to sense the ECAP signal in addition to selectingthe expected range of characteristic values based on the posture ofpatient 105. In fact, the expected range of characteristic values for aparticular ECAP signal may be defined by one or more “transferfunctions,” where each posture of the set of postures being associatedwith a respective transfer function.

As described herein, a transfer function may define a relationshipbetween a magnitude of a stimulation pulse which causes IMD 110 to sensean ECAP signal and a target ECAP value of the ECAP signal. Each postureof patient 105 may be associated with a transfer function which definesthe respective relationship between stimulation magnitude and the targetECAP value of the ECAP signal. In some examples, one or more transferfunctions that are each associated with a respective posture mayrepresent a linear function, meaning that such transfer functions definea linear relationship between the magnitude of a stimulation pulse andthe expected range of characteristic values of the ECAP signal resultingfrom the stimulation pulse. However, this does not need to be the case.Transfer functions may represent any one or combination of functionsincluding linear functions, quadratic functions, exponential functions,piecewise functions, power functions, polynomial functions, rationalfunctions, logarithmic functions, and sinusoidal functions.

In some examples, a standing posture is associated with a first transferfunction including a first slope, a sitting posture is associated with asecond transfer function including a second slope, and a supine postureis associated with a third transfer function including a third slope. Insome examples, the first transfer function, the second transfer functionmay each represent functions where an expected range of characteristicvalues of one or more ECAP signal are plotted against a magnitude of astimulation pulse which causes IMD 110 to sense the respective ECAPsignal, where the expected range of characteristic values are plotted ona y-axis of a graph, and the stimulation magnitude is plotted on anx-axis of the graph. In at least some such examples, the first slope ofthe first transfer function is greater than the second slope of thesecond transfer function, and the second slope of the second transferfunction is greater than the third slope of the third transfer function.Consequently, at times when patient 105 is occupying a supine posture,the target ECAP value (e.g., an expected range of characteristic values)is more sensitive to changes in stimulation amplitude as compared withtimes when patient 105 is standing or sitting.

Since the first transfer function, the second transfer function, and thethird transfer function each have different slopes, IMD 110 may changethe target ECAP value (e.g., the expected range of characteristicvalues) based on detecting a change in the posture of patient 105. Forexample, in response to IMD 110 determining that patient 105 isstanding, IMD 110 may select a first expected range including a firstlower-bound value and a first upper-bound value. If stimulationmagnitude is held constant and in response to IMD 110 determining thatpatient 105 is sitting, IMD 110 may select a second expected rangeincluding a second lower-bound value and a second upper-bound value.Additionally, if stimulation magnitude is held constant and in responseto IMD 110 determining that patient 105 is occupying a supine posture,IMD 110 may select a third expected range including a third lower-boundvalue and a third upper-bound value. In some examples, the thirdupper-bound value may be greater than the second upper-bound value andthe second upper-bound value may be greater than the first upper-boundvalue. Additionally, the third lower-bound value may be greater than thesecond lower-bound value and the second lower-bound value may be greaterthan the first lower-bound value.

In the example of FIG. 1 , IMD 110 is described as performing aplurality of processing and computing functions. However, externalprogrammer 150 instead may perform one, several, or all of thesefunctions. In this alternative example, IMD 110 functions to relaysensed signals to external programmer 150 for analysis, and externalprogrammer 150 transmits instructions to IMD 110 to adjust the one ormore parameters defining the electrical stimulation therapy based onanalysis of the sensed signals. For example, IMD 110 may relay thesensed signal indicative of a ECAP signal to external programmer 150.External programmer 150 may compare a characteristic value of the ECAPsignal to the respective expected range of characteristic values, and inresponse to the comparison, external programmer 150 may instruct IMD 110to adjust one or more parameters that define the electrical stimulationpulses delivered to patient 105.

In the example techniques described in this disclosure, the controlstimulation parameters and the target ECAP value (e.g., an expectedrange of characteristic values) of the ECAP signals may be initially setat the clinic but may be set and/or adjusted at home by patient 105.Once a target ECAP value (e.g., an expected range of characteristicvalues) are set, the example techniques allow for automatic adjustmentof parameters of the stimulation pulses in order to maintain consistentvolume of neural activation and consistent perception of therapy forpatient 105 when the electrode-to-neuron distance changes. The abilityto change the stimulation parameter values may also allow the therapy tohave long term efficacy, with the ability to keep the intensity of thestimulation (e.g., as indicated by the detected ECAP signal) consistentby comparing the measured characteristic values of the ECAP signal tothe expected range of characteristic values. IMD 110 may perform thesechanges without intervention by a physician or patient 105.

In the example techniques described in this disclosure, IMD 110 maycomprise stimulation generation circuitry (not shown in FIG. 1 )configured to deliver stimulation therapy to a patient. Sensingcircuitry (not shown in FIG. 1 ) may be configured to sense informationindicative of one or more evoked compound action potential (ECAP)signals. The processing circuitry may be configured to receive theinformation indicative of one or more ECAP signals and determine that atleast one characteristic value of the one or more ECAP signals isoutside of an expected range. The processing circuitry may initiate alead integrity test for at least one electrode of the medical lead(s)130 responsive to determining that the at least one characteristic valueof the one or more ECAP signals is outside of the expected range. Insome examples, the processing circuitry may also suspend closed-loopcontrol of stimulation parameters in response to a characteristic valueof the ECAP signals being outside of the expected range. In response tothe medical lead passing the lead integrity test, the processingcircuitry may temporarily suspend closed-loop control of stimulationparameters and restart closed-loop control after a certain period oftime or in response to the characteristic returning to the expectedrange, for example. In response to the medical lead (or one or moreelectrodes of the lead) failing the lead integrity test, the processingcircuitry may automatically select new electrode combinations forsensing (and delivery of stimulation in some examples) or request a userto select a different electrode combination for sensing (and delivery ofstimulation in some examples).

FIG. 2 is a block diagram illustrating an example configuration ofcomponents of IMD 200, in accordance with one or more techniques of thisdisclosure. IMD 200 may be an example of IMD 110 of FIG. 1 . In theexample shown in FIG. 2 , IMD 200 includes stimulation generationcircuitry 202, switch circuitry 204, sensing circuitry 206,communication circuitry 208, processing circuitry 210, storage device212, sensor(s) 222, and power source 224. As seen in FIG. 2 , sensor(s)222 include acceleration sensor 223.

In the example shown in FIG. 2 , storage device 212 stores closed-looptherapy stimulation programs 214 and diagnostic programs 216 in separatememories within storage device 212 or separate areas within storagedevice 212. Each stored therapy stimulation program of therapystimulation programs 214 defines values for a set of electricalstimulation parameters (e.g., a stimulation parameter set), such as astimulation electrode combination, electrode polarity, current orvoltage amplitude, pulse width, pulse rate, and pulse shape. Each storeddiagnostic program 216 defines operations for performing lead integrityand closed-loop diagnostics. Diagnostic program 216 may also haveadditional information such as instructions regarding when to suspendclosed-loop therapy, inform the patient 105 to seek assistance or adjusttherapy parameters, ask patient 105 questions regarding therapy deliveryand perform lead integrity tests.

Accordingly, in some examples, stimulation generation circuitry 202generates electrical stimulation signals in accordance with theelectrical stimulation parameters noted above. Other ranges ofstimulation parameter values may also be useful and may depend on thetarget stimulation site within patient 105. While stimulation pulses aredescribed, stimulation signals may be of any form, such ascontinuous-time signals (e.g., sine waves) or the like. Switch circuitry204 may include one or more switch arrays, one or more multiplexers, oneor more switches (e.g., a switch matrix or other collection ofswitches), or other electrical circuitry configured to directstimulation signals from stimulation generation circuitry 202 to one ormore of electrodes 232, 234, or directed sensed signals from one or moreof electrodes 232, 234 to sensing circuitry 206. In other examples,stimulation generation circuitry 202 and/or sensing circuitry 206 mayinclude sensing circuitry to direct signals to and/or from one or moreof electrodes 232, 234, which may or may not also include switchcircuitry 204.

Sensing circuitry 206 monitors signals from any combination ofelectrodes 232, 234. In some examples, sensing circuitry 206 includesone or more amplifiers, filters, and analog-to-digital converters.Sensing circuitry 206 may be used to sense physiological signals, suchas ECAPs. Additionally, or alternatively, sensing circuitry 206 maysense one or more stimulation pulses delivered to patient 105 viaelectrodes 232, 234. In some examples, sensing circuitry 206 detectselectrical signals, such ECAPs from a particular combination ofelectrodes 232, 234. In some cases, the particular combination ofelectrodes for sensing ECAPs includes different electrodes than a set ofelectrodes 232, 234 used to deliver stimulation pulses. Alternatively,in other cases, the particular combination of electrodes used forsensing ECAPs includes at least one of the same electrodes as a set ofelectrodes used to deliver stimulation pulses to patient 105. Sensingcircuitry 206 may provide signals to an analog-to-digital converter, forconversion into a digital signal for processing, analysis, storage, oroutput by processing circuitry 210.

Communication circuitry 208 supports wireless communication between IMD200 and an external programmer (not shown in FIG. 2 ) or anothercomputing device under the control of processing circuitry 210.Processing circuitry 210 of IMD 200 may receive, as updates to programs,values for various stimulation parameters such as amplitude andelectrode combination, from the external programmer via communicationcircuitry 208. Updates to the closed-loop therapy stimulation programs214 and diagnostic programs 216 may be stored within storage device 212.Communication circuitry 208 in IMD 200, as well as communicationcircuits in other devices and systems described herein, such as theexternal programmer, may accomplish communication by radiofrequency (RF)communication techniques. In addition, communication circuitry 208 maycommunicate with an external medical device programmer (not shown inFIG. 2 ) via proximal inductive interaction of IMD 200 with the externalprogrammer. The external programmer may be one example of externalprogrammer 150 of FIG. 1 . Accordingly, communication circuitry 208 maysend information to the external programmer on a continuous basis, atperiodic intervals, or upon request from IMD 110 or the externalprogrammer.

Processing circuitry 210 may include any one or more of amicroprocessor, a controller, a digital signal processor (DSP), anapplication specific integrated circuit (ASIC), a field-programmablegate array (FPGA), discrete logic circuitry, or any other processingcircuitry configured to provide the functions attributed to processingcircuitry 210 herein may be embodied as firmware, hardware, software orany combination thereof. Processing circuitry 210 controls stimulationgeneration circuitry 202 to generate stimulation signals according toclosed-loop therapy stimulation programs 214 and diagnostic programs 216stored in storage device 212 to apply stimulation parameter valuesspecified by one or more of programs, such as amplitude, pulse width,pulse rate, and pulse shape of each of the stimulation signals.

In the example shown in FIG. 2 , the set of electrodes 232 includeselectrodes 232A, 232B, 232C, and 232D, and the set of electrodes 234includes electrodes 234A, 234B, 234C, and 234D. In other examples, asingle lead may include all eight electrodes 232 and 234 along a singleaxial length of the lead. Processing circuitry 210 also controlsstimulation generation circuitry 202 to generate and apply thestimulation signals to selected combinations of electrodes 232, 234. Insome examples, stimulation generation circuitry 202 includes a switchcircuit (instead of, or in addition to, switch circuitry 204) that maycouple stimulation signals to selected conductors within leads 230,which, in turn, deliver the stimulation signals across selectedelectrodes 232, 234. Such a switch circuit may be a switch array, switchmatrix, multiplexer, or any other type of switching circuit configuredto selectively couple stimulation energy to selected electrodes 232, 234and to selectively sense bioelectrical neural signals of a spinal cordof the patient (not shown in FIG. 2 ) with selected electrodes 232, 234.

In other examples, however, stimulation generation circuitry 202 doesnot include a switch circuit and switch circuitry 204 does not interfacebetween stimulation generation circuitry 202 and electrodes 232, 234. Inthese examples, stimulation generation circuitry 202 includes aplurality of pairs of voltage sources, current sources, voltage sinks,or current sinks connected to each of electrodes 232, 234 such that eachpair of electrodes has a unique signal circuit. In other words, in theseexamples, each of electrodes 232, 234 is independently controlled viaits own signal circuit (e.g., via a combination of a regulated voltagesource and sink or regulated current source and sink), as opposed toswitching signals between electrodes 232, 234.

Electrodes 232, 234 on respective leads 230 may be constructed of avariety of different designs. For example, one or both of leads 230 mayinclude one or more electrodes at each longitudinal location along thelength of the lead, such as one electrode at different perimeterlocations around the perimeter of the lead at each of the locations A,B, C, and D. In one example, the electrodes may be electrically coupledto stimulation generation circuitry 202, e.g., via switch circuitry 204and/or switching circuitry of the stimulation generation circuitry 202,via respective wires that are straight or coiled within the housing ofthe lead and run to a connector at the proximal end of the lead. Inanother example, each of the electrodes of the lead may be electrodesdeposited on a thin film. The thin film may include an electricallyconductive trace for each electrode that runs the length of the thinfilm to a proximal end connector. The thin film may then be wrapped(e.g., a helical wrap) around an internal member to form the lead 230.These and other constructions may be used to create a lead with acomplex electrode geometry.

Although sensing circuitry 206 is incorporated into a common housingwith stimulation generation circuitry 202 and processing circuitry 210in FIG. 2 , in other examples, sensing circuitry 206 may be in aseparate housing from IMD 200 and may communicate with processingcircuitry 210 via wired or wireless communication techniques.

In some examples, one or more of electrodes 232 and 234 are suitable forsensing one or more ECAPs. For instance, electrodes 232 and 234 maysense the voltage amplitude of a portion of the ECAP signals, where thesensed voltage amplitude is a characteristic of the ECAP signal.

Storage device 212 may be configured to store information within IMD 200during operation. Storage device 212 may include a computer-readablestorage medium or computer-readable storage device. In some examples,storage device 212 includes one or more of a short-term storage deviceor a long-term memory. Storage device 212 may include, for example,random access memories (RAM), dynamic random-access memories (DRAM),static random access memories (SRAM), magnetic discs, optical discs,flash memories, or forms of electrically programmable memories (EPROM)or electrically erasable and programmable memories (EEPROM). In someexamples, storage device 212 is used to store data indicative ofinstructions for execution by processing circuitry 210. As discussedabove, storage device 212 is configured to store closed-loop therapystimulation programs 214, diagnostic programs 216, and target values 218including baseline ECAP values recorded by a clinician and/or physician.

In some examples, stimulation generation circuitry 202 may be configuredto deliver electrical stimulation therapy to patient 105. Stimulationgeneration circuitry 202 may deliver pulses that evoke detectableresponsive ECAPs in the target tissue, the responsive ECAPs propagatingthrough the target tissue before arriving back at electrodes 232, 234.In some examples, a different combination of electrodes 232, 234 maysense responsive ECAPs than a combination of electrodes 232, 234 thatdelivers stimulation (e.g., recording electrode combinations for sensingECAPs and stimulation electrode combinations for providing closed loopstimulation therapy). Sensing circuitry 206 may be configured to detectthe responsive ECAPs via electrodes 232, 234 and leads 230.

Processing circuitry 210 may periodically or continuously compare sensedone or more characteristic ECAP values to values of an expected rangeand determine whether the characteristic ECAP values are within anexpected range. For example, if processing circuitry 210 detects low orno ECAP amplitude values, then processing circuitry 210 may begin a leadintegrity test to determine if lead integrity has been compromised orprocessing circuitry 210 may compare the ECAP values to a characteristicbaseline to determine if noise is masking the ECAP signal.

Processing circuitry 210 analysis of characteristic values from sensedelectrical signals is not necessarily directed to determining whetherECAPs are present or not or if some determined data is acceptable ornot, although processing circuitry 210 could determine such informationin some examples. Instead, processing circuitry 210 may generally searchfor characteristics of a sensed signal that are outside of expectations,such as target values 218, and perform an action of the characteristicis outside of expectation. For example, if the characteristic values areoutside of an expected range, processing circuitry 210 may suspendclosed loop stimulation therapy, perform a lead integrity test, orreconfigure stimulation or recording electrode combinations. Processingcircuitry 210 monitors values derived from characteristic values of ECAPsignals (e.g., values calculated from signals measured as ECAPs), and ifthey are outside of an expected range, then processing circuitry 210begins a process to determine if there is a problem (e.g., a leadintegrity issue or EMI noise). If a problem is detected, processingcircuitry 210 may initiate steps to remedy the problem, such assuspending closed loop stimulation therapy, performing a lead integritytest or reconfiguring stimulation or recording electrodes if they arefound to have an integrity issue.

Determining a potential issue, such as lead integrity issues or possiblenoise, may, in some cases, depend on a posture of patient 105. Forexample, processing circuitry 210 may be configured to determine aposture of patient 105 based on an acceleration signal generated byacceleration sensor 223. In some examples, acceleration sensor 223 isconfigured to generate an accelerometer signal. Processing circuitry 210is configured to identify, based on the accelerometer signal, a postureof a set of postures which patient 105 is occupying. The set of posturesmay include, for example, a standing posture, a sitting posture, asupine posture, a prone posture, a side-lying posture, or anycombination thereof. In some examples, expected parameter values of theaccelerometer signal corresponding to each posture of the set ofpostures are stored in storage device 212. Subsequently, processingcircuitry 210 may select, based on the identified posture, an ECAPbaseline value (e.g., an expected range of characteristic values) tocompare to one or more characteristic ECAP signals sensed by IMD 200 inresponse to the one or more characteristic ECAP signals being outside ofan expected range. For example, if processing circuitry 210 detects oneor more characteristic ECAP signals are outside of an expected range,processing circuitry 210 may select an ECAP baseline value obtained atan acceleration signal activity comparable to the sensed accelerationsignal of the one or more characteristic ECAP signals which are outoutside of the expected range.

In some examples, processing circuitry 210 is configured to identify,based on the accelerometer signal, a posture of a set of postures whichpatient 105 is occupying while ECAP data is being sensed. Subsequently,processing circuitry 210 may select an expected range of characteristicECAP baseline values for one or more characteristic values of ECAPsignals sensed by sensing circuitry 206 based on the posture of patient105. For example, target values 218 may include a respective transferfunction corresponding to each posture of the set of postures, includinga baseline ECAP value at a specific posture.

Target values 218 may include baseline ECAP data (or time domain dataclip data) which may be used by diagnostic programs 216 in determiningpotential lead integrity issues as well as noise being received byelectrodes 232 and/or 234. The baseline ECAP data may be or include ECAPdata when the patient is at rest, in different postures, or undergoingknown aggressors (e.g., ECAP data sensed when the patient is under anaggressor such as different postures or activities such as sneezing orlaughing. An aggressor may be a body motion or position that causes asudden change in ECAP amplitudes (e.g., changing posture, coughing,laughing, or sneezing). In some examples, an ECAP baseline may beperformed when a subject is at rest (e.g., sleeping or lying down). Whenpatient 105 is still, then the best recording of a baseline ECAP ispossible as any noise from bodily movement is eliminated orsubstantially reduced. However, in the example above, it may be helpfulto know an ECAP baseline when patient 105 is under aggressor. Thenprocessing circuitry 210 may have an aggressor baseline to comparesensed ECAP data to in order to determine whether noise is present or ifa normal ECAP signal is present under aggressor. For example, ifprocessing circuitry 210 determines there may be noise masking the ECAPsignal or if no ECAP signal is present at all, then the ECAP signaldetected may be compared against a baseline ECAP measured in a similaraggressor condition to the patient’s current situation. If the ECAPsignal and the ECAP baseline are similar, then processing circuitry 210may determine there is an ECAP signal present and it is under aggressor.If the ECAP signal and ECAP baseline are dissimilar, then processingcircuitry may determine there is another issue (e.g., such as a brokenor cracked lead or electrode). In any case, the baseline ECAP data mayinclude acceptable ECAP data as opposed to ECAP data that may beindicative of noise or other sensing issue. Accelerometer data (foraggressors in which accelerometers may detect the body motion) may becorrelated with ECAP data under aggressors and stored as baselines forcorrelation purposes. Thus, if processing circuitry 210 detects anincrease in ECAP amplitude, this elevated ECAP amplitude may be comparedwith a baseline stored with similar accelerometer data and determine ifthe elevated ECAP amplitude correlates to the activity of patient 105 orif the elevated ECAP amplitude is due to noise or a potential leadintegrity issue.

The baseline ECAP data may also correlate with accelerometer data whichis recorded concomitantly with the sensed ECAP signals from which thebaseline ECAP data is derived. The ECAP or accelerometer data may berecorded and set as baseline ECAP data in a clinic setting when IMD 200is first programmed for patient 105. However, baseline ECAP data oraccelerometer data may also be collected during the lifetime of IMD 200(e.g., patient 105 may monitor and save these values through aprogrammer similar to external programmer 150). The accelerometer datais not necessary to establish an ECAP data baseline; however, asdiscussed above, IMD 200 may analyze accelerometer data to confirmpatient movement with ECAP data having characteristic values out of arange compared to ECAP data baseline data taken when patient 105 issedentary or in a prone position. That is, IMD 200 may select an ECAPdata baselines stored for a respective patient activity (e.g., frommultiple different ECAP data baselines stored for different respectivepatient activities) to determine whether a lead integrity issue existsor if patient 105 is in an aggressor state.

As discussed in detail below, baseline ECAP data can be used in aneffort to determine whether ECAP data is representative of actualpatient conditions or if the ECAP data is representative of noiseinstead of patient conditions during normal operation of closed-looptherapy stimulation program 214. For example, in situations wherepatient 105 is in a noisy EMI environment, EMI noise may be masking(e.g., covering up) actual physiological signals representative of nerveactivity making it difficult for processing circuitry 210 to identifyactual nerve activity from the ECAP data recorded by electrodes 232, 234to sense the ECAP data. By using one or more characteristic signals ofECAP baseline data and comparing it to one or more characteristicsignals sensed by electrodes 232, 234, processing circuitry 210 maydetermine whether the ECAP signal is representative of nerve activity ornoise that masks the nerve activity. In the event one or morecharacteristic values of ECAP data is outside of an expected range or ifone or more characteristic values of ECAP data have had a variance for aperiod of time, diagnostic program 216 may use a stored baseline valuefrom target values 218 to determine if an issue exists (e.g., a leadintegrity issue or noise masking issue). Further, with correlatedaccelerometer data, diagnostic program 218 may use baseline ECAP datawhich correlates with the current posture and/or activity level ofpatient 105 at the time diagnostic program 216 is executing.

In some examples, processing circuitry 210 is configured to determine,based on the accelerometer signal generated by acceleration sensor 223,whether accelerometer data indicates a regular circadian rhythm.Processing circuitry 210 may be configured to determine whetherelectrodes 232, 234 are functioning properly based on stored ECAP dataand accelerometer data. For example, if ECAP data has been below athreshold throughout the day but, the accelerometer data indicates aregular circadian rhythm (e.g., patient 105 is performing normal dailyfunctions and not sleeping), processing circuitry 210 may initiate alead integrity test to determine if electrodes 232, 234 or othercomponents of the lead or device (e.g., conductors that electricallyconnect the electrodes to IMD 200) are functioning properly.

Power source 224 is configured to deliver operating power to thecomponents of IMD 200. Power source 224 may include a battery and apower generation circuit to produce the operating power. In someexamples, the battery is rechargeable to allow extended operation. Insome examples, recharging is accomplished through proximal inductiveinteraction between an external charger and an inductive charging coilwithin IMD 200. Power source 224 may include any one or more of aplurality of different battery types, such as nickel cadmium batteriesand lithium ion batteries.

In some examples, medical device 200 with stimulation generationcircuitry 202 configured to deliver a closed-loop stimulation to patient105 and sensing circuitry 206 configured to sense information indicativeof one or more ECAP signals, may be configured to, with processingcircuitry 210, receive the information indicative of one or more ECAPsignals. Processing circuitry 210 may verify the one or more ECAPsignals against a baseline ECAP, stored in target values 218, anddetermine that at least one characteristic value of the one or more ECAPsignals is outside of an expected range. Processing circuitry 210 mayinitiate a lead integrity test for the medical lead responsive todetermining that the at least one characteristic value of the one ormore ECAP signals is outside of the expected range. Processing circuitry210 may diagnose lead integrity issues or noise picked up by the sensingelectrodes based upon the lead integrity test, the received one or moreECAP signals, and the baseline ECAP data.

FIG. 3 is a block diagram illustrating an example configuration ofcomponents of external programmer 300, in accordance with one or moretechniques of this disclosure. External programmer 300 may be an exampleof external programmer 150 of FIG. 1 . Although external programmer 300may generally be described as a hand-held device, external programmer300 may be a larger portable device or a more stationary device. Inaddition, in other examples, external programmer 300 may be included aspart of an external charging device or include the functionality of anexternal charging device. As illustrated in FIG. 3 , external programmer300 may include processing circuitry 352, storage device 354, userinterface 356, telemetry circuitry 358, and power source 360. Storagedevice 354 may store instructions that, when executed by processingcircuitry 352, cause processing circuitry 352 and external programmer300 to provide the functionality ascribed to external programmer 300throughout this disclosure. Each of these components, circuitry, ormodules, may include electrical circuitry that is configured to performsome, or all of the functionality described herein. For example,processing circuitry 352 may include processing circuitry configured toperform the processes discussed with respect to processing circuitry352.

In general, external programmer 300 includes any suitable arrangement ofhardware, alone or in combination with software and/or firmware, toperform the techniques attributed to external programmer 300, andprocessing circuitry 352, user interface 356, and telemetry circuitry358 of external programmer 300. In various examples, external programmer300 may include one or more processors, such as one or moremicroprocessors, DSPs, ASICs, FPGAs, or any other equivalent integratedor discrete logic circuitry, as well as any combinations of suchcomponents. External programmer 300 also, in various examples, mayinclude a storage device 354, such as RAM, ROM, PROM, EPROM, EEPROM,flash memory, a hard disk, a CD-ROM, including executable instructionsfor causing the one or more processors to perform the actions attributedto them. Moreover, although processing circuitry 352 and telemetrycircuitry 358 are described as separate modules, in some examples,processing circuitry 352 and telemetry circuitry 358 are functionallyintegrated. In some examples, processing circuitry 352 and telemetrycircuitry 358 correspond to individual hardware units, such as ASICs,DSPs, FPGAs, or other hardware units.

Storage device 354 (e.g., a storage device) may store instructions that,when executed by processing circuitry 352, cause processing circuitry352 and external programmer 300 to provide the functionality ascribed toexternal programmer 300 throughout this disclosure. For example, storagedevice 354 may include instructions that cause processing circuitry 352to obtain a parameter set from memory, select a spatial electrodemovement pattern, or receive a user input and send a correspondingcommand to IMD 200, or instructions for any other functionality. Inaddition, storage device 354 may include a plurality of programs, whereeach program includes a parameter set that defines stimulation pulsesand baseline ECAP values. Storage device 354 may also store datareceived from a medical device (e.g., IMD 110). For example, storagedevice 354 may store stimulation signal and/or ECAP related datarecorded at a sensing module of the medical device, and storage device354 may also store data from one or more sensors of the medical device.

User interface 356 may include a button or keypad, lights, a speaker forvoice commands, a display, such as a liquid crystal (LCD),light-emitting diode (LED), or organic light-emitting diode (OLED). Insome examples the display includes a touch screen. User interface 356may be configured to display any information related to the delivery ofelectrical stimulation, identified patient behaviors, sensed patientparameter values, patient behavior criteria, or any other suchinformation. User interface 356 may also receive user input via userinterface 356. The input may be, for example, in the form of pressing abutton on a keypad or selecting an icon from a touch screen. The inputmay request starting or stopping electrical stimulation, the input mayrequest a new spatial electrode movement pattern or a change to anexisting spatial electrode movement pattern, of the input may requestsome other change to the delivery of electrical stimulation.

Telemetry circuitry 358 may support wireless communication between themedical device and external programmer 300 under the control ofprocessing circuitry 352. Telemetry circuitry 358 may also be configuredto communicate with another computing device via wireless communicationtechniques, or direct communication through a wired connection. In someexamples, telemetry circuitry 358 provides wireless communication via anRF or proximal inductive medium. In some examples, telemetry circuitry358 includes an antenna, which may take on a variety of forms, such asan internal or external antenna.

Examples of local wireless communication techniques that may be employedto facilitate communication between external programmer 300 and IMD 110include RF communication according to the 802.11 or Bluetooth^(®)specification sets or other standard or proprietary telemetry protocols.In this manner, other external devices may be capable of communicatingwith external programmer 300 without needing to establish a securewireless connection. As described herein, telemetry circuitry 358 may beconfigured to transmit a spatial electrode movement pattern or otherstimulation parameter values to IMD 110 for delivery of electricalstimulation therapy.

In some examples, selection of stimulation parameters or therapystimulation programs are transmitted to the medical device for deliveryto a patient (e.g., patient 105 of FIG. 1 ). In other examples, thetherapy may include medication, activities, or other instructions thatpatient 105 must perform themselves or a caregiver perform for patient105. In some examples, external programmer 300 provides visual, audible,and/or tactile notifications that indicate there are new instructions.External programmer 300 requires receiving user input acknowledging thatthe instructions have been completed in some examples.

According to the techniques of the disclosure, user interface 356 ofexternal programmer 300 may present a graphic display requesting updatesto the closed loop therapy program or therapy stimulation programs 214.External programmer 300 may generate this update in response toreceiving an alert from IMD 200 (e.g., an alert regarding a failed leadintegrity test). External programmer 300 may receive an indication froma clinician instructing a processor of the medical device to update oneor more closed-loop therapy stimulation programs 214 or to update one ormore diagnostic programs 216. Updating closed-loop therapy stimulationprograms 214 and diagnostic programs 216 may include changing one ormore parameters of the stimulation pulses delivered by the medicaldevice according to the programs, such as reconfiguration of anelectrode combination (e.g., modifying a current electrode combinationor selecting a different electrode combination) to not include anelectrode associated with a filed lead integrity test, and othervariables such as amplitude, pulse width, frequency, and pulse shape ofthe informed pulses and/or control pulses. User interface 356 may alsoreceive instructions from the clinician commanding any electricalstimulation, including control pulses and/or informed pulses to commenceor to cease.

Power source 360 is configured to deliver operating power to thecomponents of external programmer 300. Power source 360 may include abattery and a power generation circuit to produce the operating power.In some examples, the battery is rechargeable to allow extendedoperation. Recharging may be accomplished by electrically coupling powersource 360 to a cradle or plug that is connected to an alternatingcurrent (AC) outlet. In addition, recharging may be accomplished throughproximal inductive interaction between an external charger and aninductive charging coil within external programmer 300. In otherexamples, traditional batteries (e.g., nickel cadmium or lithium ionbatteries) may be used. In addition, external programmer 300 may bedirectly coupled to an alternating current outlet to operate.

FIG. 4 is a graph 402 of example evoked compound action potentials(ECAPs) sensed for respective stimulation pulses, in accordance with oneor more techniques of this disclosure. As shown in FIG. 4 , graph 402shows example ECAP signal 404 (dotted line) and ECAP signal 406 (solidline). In some examples, each of ECAP signals 404 and 406 are sensedfrom stimulation pulses that were delivered from a guarded cathode,where the stimulation pulses are bi-phasic pulses including aninterphase interval between each positive and negative phase of thepulse. In some such examples, the guarded cathode includes stimulationelectrodes located at the end of an 8-electrode lead (e.g., leads 130 ofFIG. 1 ) while two sensing electrodes are provided at the other end ofthe 8-electrode lead. ECAP signal 404 illustrates the voltage amplitudesensed as a result from a sub-detection threshold stimulation pulse, ora stimulation pulse which results in no detectable ECAP. It is notedthat monophasic, tri-phasic, or pulses with another quantity of phasesmay be in other examples.

Peaks 408 of ECAP signal 404 are detected and represent artifacts ofstimulation signals of the delivered stimulation pulse. However, nopropagating signal is detected after the stimulation signal in ECAPsignal 404 because the stimulation pulse had an intensity (e.g., anamplitude and/or pulse width) that was “sub-threshold” or below adetection threshold (e.g., a sub-detection threshold) and/or below apropagation threshold (e.g., a sub-propagation threshold).

In contrast to ECAP signal 404, ECAP signal 406 represents the voltageamplitude detected from a supra-detection stimulation thresholdstimulation pulse. Peaks 408 of ECAP signal 406 are detected andrepresent stimulation signals of the delivered stimulation pulse. Afterpeaks 408, ECAP signal 406 also includes peaks P1, N1, and P2, which arethree typical peaks representative of propagating action potentials froman ECAP. The example duration of the stimulation signal and peaks P1,N1, and P2 is approximately 1 millisecond (ms).

When detecting the ECAP of ECAP signal 406, different characteristicsmay be identified. For example, the characteristic of the ECAP may bethe amplitude between N1 and P2. This N1-P2 amplitude may be easilydetectable even if the stimulation signal impinges on P1, a relativelylarge signal, and the N1-P2 amplitude may be minimally affected byelectronic drift in the signal. In other examples, the characteristic ofthe ECAP used to control subsequent stimulation pulses may be anamplitude of P1, N1, or P2 with respect to neutral or zero voltage. Insome examples, the characteristic of the ECAP used to control subsequentstimulation pulses is a sum of two or more of peaks P1, N1, or P2. Inother examples, the characteristic of ECAP signal 406 may be the areaunder one or more of peaks P1, N1, and/or P2. In other examples, thecharacteristic of the ECAP may be a ratio of one of peaks P1, N1, or P2to another one of the peaks. In some examples, the characteristic of theECAP is a slope between two points in the ECAP signal, such as the slopebetween N1 and P2. In other examples, the characteristic of the ECAP maybe the time between two points of the ECAP, such as the time between N1and P2.

The time between when the stimulation pulse is delivered and a point inthe ECAP signal may be referred to as a latency of the ECAP and mayindicate the types of fibers being captured by the stimulation pulse.ECAP signals with lower latency (i.e., smaller latency values) indicatea higher percentage of nerve fibers that have faster propagation ofsignals, whereas ECAP signals with higher latency (i.e., larger latencyvalues) indicate a higher percentage of nerve fibers that have slowerpropagation of signals. Latency may also refer to the time between anelectrical feature is detected at one electrode and then detected againat a different electrode. This time, or latency, is inverselyproportional to the conduction velocity of the nerve fibers. Othercharacteristics of the ECAP signal may be used in other examples.

The amplitude of the ECAP signal increases with increased amplitude ofthe stimulation pulse, as long as the pulse amplitude is greater thanthreshold such that nerves depolarize and propagate the signal. Thetarget ECAP characteristic (e.g., the target ECAP amplitude) may bedetermined from the ECAP signal detected from a stimulation pulse (or acontrol pulse) when informed pulses are determined to deliver effectivetherapy to patient 105. The ECAP signal thus is representative of thedistance between the stimulation electrodes and the nerves appropriatefor the stimulation parameter values of the informed pulses delivered atthat time. Therefore, IMD 110 may attempt to use detected changes to themeasured ECAP characteristic value to change therapy pulse parametervalues and maintain the target ECAP characteristic value during therapypulse delivery.

FIG. 5 is a timing diagram 500 illustrating an example of electricalstimulation pulses, respective stimulation signals, and respectivesensed ECAPs, in accordance with one or more techniques of thisdisclosure. For convenience, FIG. 5 is described with reference to IMD200 of FIG. 2 . As illustrated, timing diagram 500 includes firstchannel 502, a plurality of stimulation pulses 504A-504N (collectively“stimulation pulses 504”), second channel 506, a plurality of respectiveECAPs 508A-508N (collectively “ECAPs 508”), and a plurality ofstimulation signals 509A-509N (collectively “stimulation signals 509”).Stimulation pulses 504 may represent any type of pulse that isdeliverable by IMD 200. In the example of FIG. 5 , IMD 200 may delivertherapy with control pulses instead of, or without, informed pulses.

First channel 502 is a time/voltage (and/or current) graph indicatingthe voltage (or current) of at least one electrode of electrodes 232,234. In one example, the stimulation electrodes of first channel 502 maybe located on the opposite side of the lead as the sensing electrodes ofsecond channel 506. Stimulation pulses 504 may be electrical pulsesdelivered to the spinal cord of the patient by at least one ofelectrodes 232, 234, and stimulation pulses 504 may be balanced biphasicsquare pulses with an interphase interval. In other words, each ofstimulation pulses 504 are shown with a negative phase and a positivephase separated by an interphase interval. For example, a stimulationpulse 504 may have a negative voltage for the same amount of time andamplitude that it has a positive voltage. It is noted that the negativevoltage phase may be before or after the positive voltage phase.Stimulation pulses 504 may be delivered according to closed-loop therapystimulation programs 214 stored in storage device 212 of IMD 200, andclosed-loop therapy stimulation programs 214 may be updated according touser input via an external programmer and/or may be updated according toa signal from sensor(s) 222. In one example, stimulation pulses 504 mayhave a pulse width of less than approximately 300 microseconds (e.g.,the total time of the positive phase, the negative phase, and theinterphase interval is less than 300 microseconds). In another example,stimulation pulses 504 may have a pulse width of approximately 100 µsfor each phase of the bi-phasic pulse. As illustrated in FIG. 5 ,stimulation pulses 504 may be delivered via channel 502. Delivery ofstimulation pulses 504 may be delivered by leads 230 in a guardedcathode electrode combination. For example, if leads 230 are linear8-electrode leads, a guarded cathode combination is a central cathodicelectrode with anodic electrodes immediately adjacent to the cathodicelectrode.

Second channel 506 is a time/voltage (and/or current) graph indicatingthe voltage (or current) of at least one electrode of electrodes 232,234. In one example, the electrodes of second channel 506 may be locatedon the opposite side of the lead as the electrodes of first channel 502.ECAPs 508 may be sensed at electrodes 232, 234 from the spinal cord ofthe patient in response to stimulation pulses 504. ECAPs 508 areelectrical signals which may propagate along a nerve away from theorigination of stimulation pulses 504. In one example, ECAPs 508 aresensed by different electrodes than the electrodes used to deliverstimulation pulses 504. As illustrated in FIG. 5 , ECAPs 508 may berecorded on second channel 506.

FIG. 6 is a flow diagram illustrating an example operation forcontrolling stimulation based on one or more ECAP signals, in accordancewith one or more techniques of this disclosure. FIG. 6 is described withrespect to IMD 200 of FIG. 2 . However, the techniques of FIG. 6 may beperformed by different components of IMD 200 or by additional oralternative medical devices.

In the example of FIG. 6 , stimulation generation circuitry 202 isconfigured to generate a stimulation pulse for delivery to target tissueof patient 105 (602). In some examples, stimulation generation circuitry202 is configured to generate the stimulation pulse according toclosed-loop therapy stimulation programs 214. In some examples,closed-loop therapy stimulation programs 214 may include one or moreparameter values which define stimulation pulses delivered by IMD 200.Sensing circuitry 206 may sense an ECAP signal elicited by thestimulation pulse delivered to the target tissue of patient 105 (604).

Processing circuitry 210 may determine one or more characteristic valuesassociated with the ECAP signal (606). Amplitude between two peaks ofthe ECAP signal (e.g., between N1 and P2) is one example of acharacteristic of the ECAP signal. A variance in amplitude over anextended period of time is another example of a characteristic of theECAP signal. A frequency variance over a short period of time is anotherexample of a characteristic of the ECAP signal. Processing circuitry 210may determine whether the characteristic values associated with the ECAPsignal is within an expected range of ECAP signal characteristic values(608). The expected range of ECAP signal characteristic values may alsoinclude the absence of variations in the ECAP signal characteristicsover short and long time periods. In some examples, processing circuitry210 may select the expected range of ECAP signal characteristic valuesfrom storage device 212 or target values 218. For example, processingcircuitry 210 may select the expected range of ECAP signalcharacteristic values based on a determined posture of patient 105 andan amplitude of the stimulation pulse which causes IMD 200 to sense theECAP signal. In response to determining that the characteristic valuesassociated with the ECAP signal is within the expected range of ECAPsignal characteristic values (“YES” branch of block 608), processingcircuitry 210 may continue with normal closed-loop therapy operation(610) and continue to generate stimulation pulses (602). The expectedrange of ECAP signal characteristic values may be a larger range andinvolve more or different characteristic values than an amplitude rangeas compared to target values 218 for the therapy stimulation programs218. For example, if the ECAP signal characteristic values are outsideof target ECAP values, the closed-loop programming may increase ordecrease stimulation amplitude. In contrast, the expected range for theECAP signal characteristic values discussed in FIG. 6 may be a largerrange and involve different or additional parameters, such as variance,than the target ECAP values for the closed-loop programming where beingoutside the expected range signifies that something is wrong, and leadintegrity may be an issue. Thus, for purposes of the descriptionexpected range of ECAP signal characteristic values is an equal orbroader range than the target ECAP values in the closed-loop therapystimulation programs 214.

In response to determining that the ECAP signal characteristic valuesassociated with the ECAP signal are not within the expected range ofECAP signal characteristic values (“NO” branch of block 608), processingcircuitry 210 may determine whether the ECAP signal characteristic hasbeen outside the expected range for a predefined period of time. Thepredefined period of time may be set and stored in target values 218 andmay depend on the ECAP signal characteristic values that are outside ofthe expected range. The predefined period may be in terms of time. Forexample, if an ECAP signal characteristic amplitude has been below 10µVthroughout a twenty-four-hour period(“No” branch of block 608), this maytrigger diagnostic program 216 to determine why the ECAP signalcharacteristic amplitude is low for so long, such as a lead integritytest (612). In another example, if an ECAP signal characteristicamplitude remains above an upper limit of the expected range of ECAPcharacteristic values after stimulation amplitude has decreased to alower or zero threshold (“NO” branch of block 608), this may triggerdiagnostic program 216 to determine why the ECAP amplitude has remainedhigh when it should be showing a decrease (612). The predefined periodmay be in terms of detecting a variance. For example, if an ECAP signalcharacteristic amplitude has presented a variance sustained over aprolonged period of time without triggering a closed-loop state change(“NO” branch of block 608), this may trigger diagnostic program 216 todetermine why the ECAP amplitude is so erratic (612), but yet not atlevels to initiate a closed-loop state change). In another example, ifan ECAP signal characteristic amplitude has a large amount of varianceover a short period of time, possibly indicating a fractured conductoror a fractured electrode, this may trigger diagnostic program 216 to runa lead integrity test to determine if there is a lead fracture issue.

In response to determining that the ECAP signal characteristic valuesare not outside of the expected range for a predefined period of time(“NO” branch of block 608), then closed-loop therapy stimulation program214 continues with closed-loop therapy (610) and the system may continueto generate stimulation pulses (602). For example, processing circuitry210 may adjust stimulation amplitude based on the characteristic of theECAP signal. In response to determining that the ECAP signalcharacteristic values are outside of the expected range, outside of theexpected range for greater than a predefined period of time or have along or short term variation in the ECAP signal characteristic values(“NO” branch of block 608), then diagnostic program 216 is executed totroubleshoot why the ECAP signal is outside of the expected range (612).Diagnostic program 216 may include a lead integrity test for one or morecurrent paths of the lead and/or other analyses.

FIG. 7 is a flow diagram illustrating an example operation of anauto-triggered diagnostic based on one or more ECAP signals, inaccordance with one or more techniques of this disclosure. As discussedabove, when closed-loop therapy stimulation program 214 is used, variousfactors, such as lead integrity issues or noise (e.g., EMI) picked up byrecording electrodes, may contribute to closed-loop therapy stimulationprogram 214 not functioning properly due to inaccurate informationinputted through the feedback path (e.g., the sensed ECAP signals). Inexamples of the present disclosure, a baseline ECAP, a time domain dataclip, or a baseline ECAP with a time domain data clip may be storedwithin target values 218. Target ECAP signal characteristic values orexpected ranges of ECAP characteristic values for each posture may bestored as well along with accelerometer data indicative of each posture.Processing circuitry 210 may execute diagnostic programs 216 to use thisinformation to determine whether there is a lead integrity issue or ifnoise is corrupting the ECAP signal as described below.

In operation, processing circuitry 210 may perform closed-loopstimulation according to therapy stimulation program 214 (e.g.,according to FIG. 6 ) to provide stimulation therapy to patient 105(700). Processing circuitry 210 may receive information from sensingcircuitry 206 indicative of one or more ECAP signal characteristicvalues sensed by at least one electrode 232 and/or 234 carried by amedical lead 230 (702). Processing circuitry 210 may determine that atleast one ECAP signal characteristic value of the received ECAP signalcharacteristic values is outside of an expected range, outside of anexpected range for greater than a predefined period of time, or the ECAPsignal characteristic values have short or long term variances (704).For example, this outside of range may include an unexpected ECAP signalcharacteristic trend or other unexpected change or value in sensed data.If the ECAP signal characteristic values are within the expected range(“NO” branch of block 704), then closed-loop therapy stimulation program214 may continue to execute closed-loop therapy (701) and the exampleoperation may return to block 700. If the ECAP signal characteristicvalues are outside of the expected range (“YES” branch of block 704),processing circuitry 210 may determine if accelerometer data supportsthe determined ECAP signal characteristic values (706).

For example, the amplitude of one or more ECAP signals may have a lowamplitude like ECAP signal 404 (FIG. 4 ). IMD 200 may save and examineECAP signal amplitude data in target values 218 for comparison withlater gathered ECAP data. If an ECAP amplitude has been outside of theexpected range of amplitudes, for example below 10µV for a predeterminedamount of time (e.g., minutes or hours), accelerometer data may bechecked to verify a posture of patient 105 or to examine a circadianrhythm of patient 105. In response to determining that the at least onecharacteristic value of the one or more ECAP signals is outside of theexpected range, processing circuitry 210 may determine if accelerometerdata indicates a circadian rhythm is within a normal circadian rhythmrange (706). That is, is the ECAP characteristic value being outside ofthe expected range consistent with the accelerometer data. For example,patient 105 sleeping may be consistent with low ECAP characteristicvalues and not necessitate any further diagnostic testing.

If the accelerometer data supports a circadian rhythm correlating withthe ECAP signal characteristic values, then diagnostic program 216 mayreturn to normal operation of the closed-loop therapy program 214 (“YES”branch of block 706). If the accelerometer data does not support acircadian rhythm of the ECAP signal characteristic values (e.g., theaccelerometer indicates patient 105 is in a strenuous activity) thendiagnostic program 216 is triggered (“NO” branch of block 706) (708).

Processing circuitry 210 may initiate a lead integrity test for medicallead 230 (710). The lead integrity test may include, but is not limitedto, an electrode impedance measurement with low amplitude (i.e.,amplitude below a perception threshold by patient 105, saved in targetvalues 218 from a prior clinic visit) test pulse of all electrodes 232and/or 234 or only a subset of electrodes, such as the electrodesinvolved in sensing electrode combinations and, in some examples,stimulation electrode combinations.

If an electrode integrity issue is found (“Yes” branch of block 710) onat least one recording electrode, therapy program 214 may alter therecording configuration eliminating any electrode with an integrityissue (712). In another example, if the electrode integrity testdiscovers integrity issues with at least one stimulation electrode, IMD200 may instruct patient 105, possibly through user interface 356, toseek out clinician assistance for a potential reprogram of IMD 200.

If no lead integrity issue was discovered, then diagnostic program 216suspends closed-loop therapy program 214 and begins a periodiccomparison with an ECAP signal baseline characteristic value until anECAP signal characteristic value is found (“NO” branch of block 710)(714). Once the ECAP signal characteristic values are found to be withina tolerance of the ECAP signal baseline characteristic value,closed-loop therapy 214 may resume (700).

FIG. 8 is a flow diagram illustrating an example operation for triggereddiagnostics based upon ECAP data, in accordance with one or moretechniques of this disclosure. During normal operation processingcircuitry 210 may operate closed-loop therapy stimulation program 214(802). Processing circuitry 210 may receive one or more ECAP signalsfrom sensing circuitry 206 and electrodes 232 and/or 234 (804).Processing circuitry 210 may determine if the ECAP signals are outsidethe expected range for greater than the predetermined amount of time(806). The expected range may vary for every patient and the expectedrange may vary along with changes in the closed-loop program. Forexample, when the ECAP signal is above a threshold, stimulationamplitude may be decreased. Responding to the decrease in stimulationamplitude, the ECAP may also decrease. If the stimulation amplitude issubstantially decreased (e.g., down to 0 volts (V)) and the ECAP signalis still showing a large amplitude, then the signal being sensed may benoise and not an ECAP signal. Outside of the expected range values maybe a value above the closed-loop algorithm threshold, such as theexample just provided. In another example, the expected range may be anysignal from 0 microvolts (µV) to 30µV. In other examples, the expectedrange may be any signal from 0 µV to 20 µV. In yet other examples, theexpected range may be any signal from 0 µV to 10 µV.

If ECAP signals are outside of the expected range for greater than thepredetermined amount of time, processing circuitry 210 may suspendclosed-loop therapy and initiate diagnostic program 216 (“YES” branch ofblock 806). If ECAP signals are all within the expected range, thenclosed-loop therapy stimulation program 214 may continue closed-loopstimulation therapy 214 (801) (“NO” branch of block 806) and the exampleoperation may return to block 802.

In a situation where one or more of the ECAP signal characteristicvalues are outside the expected range for a predetermined period of time(“YES” branch of block 806), then the ECAP signal characteristic valuesmay be compared to the ECAP baseline characteristic value (808). Forexample, when stimulation amplitude has been decreased to a lowerthreshold or has been lowered to zero, but an ECAP signal characteristicvalues are still above an upper limit, a template matching check may betriggered. Diagnostics program 216 may identify if an ECAP signalcharacteristic value is actually present in the sensed ECAP signalcharacteristic values or if the sensed signal is actually noise (808).

If the sensed one or more ECAP signal characteristic values is outsideof an expected characteristic threshold, processing circuitry 210 maycompare the one or more sensed ECAP signal characteristic values to abaseline ECAP characteristic value stored in target values 218 (808).Processing circuity 210 may verify whether the one or more ECAP signalsare one of either noise or verified one or more ECAP signalcharacteristic values as compared against the baseline ECAPcharacteristic value.

If processing circuitry 210 determines an ECAP signal is present (“YES”branch of block 808), as it matches or significantly matches thebaseline ECAP characteristic value, processing circuitry 210 may performa lead integrity test of the stimulation electrodes 232 and/or 234 todetermine the presence of a fractured lead or electrode providing onlyintermittent ECAP characteristic values (810). During the lead integritytest, processing circuitry 210 may ask patient 105 to indicate if theyare perceiving any overstimulation while conducting a low amplitudeimpedance measurement of the stimulation electrodes. If no issue isfound with the stimulation electrodes 232 and/or 234 during theelectrode integrity check (“NO” branch of block 810), processingcircuitry 210 may ask patient 105 if an adjustment to closed-looptherapy program 214 is needed (812). Patient 105 may then interact withuser interface 356 of external device 300 and adjust the closed-looptherapy stimulation program 214 and return to closed-loop therapystimulation (802).

If an open or fractured circuit is found with the stimulation electrodesduring the lead integrity test (e.g., meaning a lead or a stimulationelectrode is faulty)(“YES” branch of block 810), processing circuitry210 may transmit a request to programmer 150 to prompt patient 105 toseek out a clinician and ask for potential reprogram of closed-looptherapy program 214 (814).

If the ECAP value cannot be verified as being an actual ECAP signal(“NO” branch of block 808), it may be possible the ECAP signalcharacteristic values are actually noise being recorded by the recordingelectrodes. Processing circuitry 210 may then perform a lead integritytest on both the stimulation and recording electrodes (816).

If both the stimulation and recording electrodes pass the lead integritytest (“YES” branch of block 816), processing circuitry 210 may suspendclosed-loop therapy stimulation program 214 (818) and re-conductbaseline matching (820) periodically until an ECAP signal characteristicvalues is found or until a recorded signal matches or significantlymatches the baseline signal characteristic value (“NO” branch of block818). In an example, the initial periodicity for baseline matching mayhave a resolution of minutes (e.g., from 1 to 2 minutes) and mayincrease in frequency gradually over time in some examples. In otherexamples, the periodicity may be up to an hour or more, however, if thesuspected noise hasn’t dissipated in a short period of time, then thesystem may determine that there is a different issue causing theproblem, such as a fractured lead.

Once one or more ECAP signals are found, closed-loop therapy stimulationprogram 214 may resume operation (“YES” branch of block 820) (802).Often times, this may be a matter of allowing an EMI noise source tostop operating or for patient 105 to distance themselves from the noisesource. For example, once diagnostic program 216 determines there may benoise masking the ECAP signal characteristic values (818) IMD 200 maytransmit an alert to programmer 300, and in response to receiving thealert, user interface 356 may, instruct patient 105 to look around forpossible sources of EMI noise and to move away from them briefly.

If an open circuit is found with a recording electrode 232 and/or 234(“NO” branch of block 816), closed-loop therapy stimulation program 214may be instructed to alter the recording electrode configuration (822).Diagnostic program 216 then returns operation to closed-loop therapystimulation program 214 (802).

FIG. 9 is a flow diagram illustrating an example operation fordiagnostics based on ECAP data indicating potential EMI noise, inaccordance with one or more techniques of this disclosure. During normaloperation processing circuitry 210 may perform closed-loop therapystimulation program 214 (902). Processing circuitry 210 may receive oneor more ECAP signal characteristic values from sensing circuitry 206 andelectrodes 232 and/or 234 (904). Processing circuitry 210 may evaluatethe one or more ECAP signal characteristic values to determine if theone or more ECAP signal characteristic values is showing a varianceoutside of the expected range for greater than the predefined period oftime (906). If one or more ECAP signal characteristic values are showinga long-term variance or a high frequency short term variance outside ofthe expected range (“YES” branch of block 906) diagnostic program 216may be automatically triggered. If ECAP signals are all within theexpected range for the predefined amount of time, then closed-looptherapy stimulation may resume operation (901) and the example operationmay return to block 902.

In situations where sensed ECAP characteristic values are showing alarge amount of variance sustained over a prolonged period of time,without the triggering changes in stimulation parameters, diagnosticprogram 216 may compare one or more ECAP signal characteristic valueswith a baseline ECAP signal characteristic value and verify if an ECAPsignal may be present (908).

If no ECAP signals are detected (“NO” branch of 908), an electrodeintegrity test may be performed on the recording and stimulationelectrodes 232 and/or 234 (916). If both the recording and stimulationelectrodes 232 and/or 234 pass the integrity test (“YES” branch of 916),then closed-loop therapy stimulation programming may be temporarilysuspended (918). During stimulation suspension another baseline ECAPmatching test may be performed periodically (920) until one or more ECAPsignal characteristic values may be matched or one or more collectedsignals substantially matches the saved baseline signal (“NO” branch of920). Once one or more ECAP signal characteristic values is matched orsubstantially matched, then closed-loop therapy stimulation program 214may be reengaged (“YES” branch of 920) (902).

If an open circuit or damaged electrode is found with the recordingelectrodes 232 and/or 234, (“NO” branch of 916), then diagnostic program216 may instruct closed-loop therapy stimulation program 214 to alterthe recording configuration (922) and return to normal closed-looptherapy stimulation programing (902). If an open circuit or damagedelectrode is found with the stimulation electrodes 232 and/or 234 (“NO”branch of 916), then diagnostic program 216 instructs closed-looptherapy stimulation program 214 to suspend therapy and patient 105 maybe instructed through user interface 356 to seek out reprogramming ofclosed-loop therapy stimulation program.

If the ECAP signal characteristic values are matched (“YES” branch of908), then diagnostic program 216 may suspend closed loop operation andinstruct patient 105 to determine if an adjustment to closed-looptherapy stimulation program 214 may be needed (914). If so, then patient105 may follow an at home reprogramming process.

FIG. 10 is a flow diagram illustrating an example method forautomatically performing lead integrity testing according to examples ofthe present disclosure. For example, the described method may be used byIMD 200 in FIG. 2 to automatically perform lead integrity testing. IMD200 performs lead integrity testing (1002). Lead functionalityclosed-looping, e.g., lead impedance or current closed-looping, may beperformed using any known techniques. For example, to perform leadintegrity testing, IMD 200 may deliver a non-therapeutic pulse via acombination of two electrodes, measure final voltage or currentamplitude for the pulse, and determine an impedance for the combinationbased on the measured final amplitude. Testing may be repeated for aplurality of electrode combinations and/or for the same combinations ofelectrodes on multiple occasions according to the instructions stored byIMD 200.

After performing the lead integrity test, IMD 200 stores the results ofthe test in storage device 212 (1004). IMD 200 may also determine if thelead integrity test results are within limits defined by the storedinstructions (1006). IMD 200 may compare measured impedance or currentvalues for one or more combinations, or one or more averages determinedbased on such values, to one or more threshold values stored in storagedevice 212 of IMD 200. Further, IMD 200 may compare a rate of change foran average impedance or current value to one or more threshold valuesstored in storage device 212 of IMD 200. In some embodiments, IMD 200may maintain multiple average values calculated over longer and shorterperiods of time in storage device 212 for comparison to multiplethresholds. A shorter period average that exceeds a threshold, forexample, may indicate a more severe problem that requires immediateattention, such as a lead fracture.

If one or more of the test results are outside limits defined by theinstructions, thresholds or other information stored in the IMD memory,IMD 200 may adjust patient therapy, store an alert that the patient or aclinician may receive the next time a programmer communicates with IMD200, cause external programmer 300 to immediately alert patient 105, ordirectly provide some other audible, vibratory, or stimulation alert tothe patient, e.g., via IMD 200 (1008). For example, if an electrodeconductor has a fracture, IMD 200 may stop delivering therapies that usethat electrode. If an electrode has been surrounded by fibrous or othertissue growth, which may cause an increase in the measured or averageimpedances associated with that electrode, the IMD may increase thevoltage or current amplitude for therapies that use that electrode.

If no lead integrity issue was discovered, then diagnostic program 216suspends closed-loop therapy program 214 and begins a periodiccomparison with an ECAP signal baseline characteristic value until anECAP signal characteristic value is found (“YES” branch of block 1006)(1010). Once the ECAP signal characteristic values are found to bewithin a tolerance of the ECAP signal baseline characteristic value,closed-loop therapy 214 may resume.

This disclosure includes various examples, such as the followingexamples.

Example 1A: A method comprising: receiving, by processing circuitry,information indicative of one or more evoked compound action potential(ECAP) signals, the one or more ECAP signals sensed by at least oneelectrode carried by a medical lead; determining, by processingcircuitry, that at least one characteristic value of the one or moreECAP signals is outside of an expected range; and responsive todetermining that the at least one characteristic value of the one ormore ECAP signals is outside of the expected range, performing, by theprocessing circuitry, a lead integrity test for the medical lead.

Example 2A: The method of example 1A, further comprising: receiving, bythe processing circuitry, accelerometer data indicative of patientmovement; determining, by the processing circuitry and based on theaccelerometer data, that a circadian rhythm of a patient is within anormal circadian rhythm range; determining, by the processing circuitry,the at least one characteristic value of the one or more ECAP signals isbelow the expected range; and responsive to determining that thecircadian rhythm is within the normal circadian rhythm range and thecharacteristic value of the one or more ECAP signals is below theexpected range, performing the lead integrity test.

Example 3A. The method of example 2A, further comprising performing thelead integrity test that comprises measuring an impedance for the atleast one electrode carried by the medical lead and determining whetherthe measured impedance is within one or more thresholds defined bystored instructions.

Example 4A. The method of any of examples 1A through 3A, furthercomprising: determining, by the processing circuitry, that the at leastone characteristic value of the one or more ECAP signals is an amplitudeabove the expected range; comparing, by the processing circuitry, the atleast one characteristic value of the one or more ECAP signals to atleast one characteristic value of a baseline ECAP signal; anddetermining, by the processing circuitry, based on the comparison, thatthe at least one characteristic value of the one or more ECAP signals isoutside of an expected range of the at least one characteristic value ofthe baseline ECAP signal.

Example 5A. The method of example 4A, further comprising: responsive toa determination the at least one characteristic value is outside theexpected range from the at least one characteristic value of thebaseline ECAP signal, performing a lead integrity test that comprisesmeasuring an impedance for the at least one electrode carried by themedical lead; determining, by the processing circuitry and based on leadintegrity test results, that the measured impedance of the at least oneelectrode is within one or more thresholds defined by storedinstructions; and outputting, by the processing circuitry based on asuccessful lead integrity test, a request for a user to adjust aclosed-loop stimulation algorithm that controls delivery of electricalstimulation based on the ECAP signals.

Example 6A. The method of example 4A, further comprising: responsive todetermining that the at least one characteristic value of the one ormore ECAP signals is outside the expected range of the at least onecharacteristic value of the baseline ECAP signal, performing the leadintegrity test; determining, by the processor and based on the leadintegrity test, that impedance measured at the at least one electrode ofthe medical lead is outside one or more thresholds defined by storedinstructions; and responsive to the at least one electrode of themedical lead failing the lead integrity test, requesting, by theprocessing circuitry, a user to adjust a closed-loop stimulationalgorithm that controls delivery of electrical stimulation based on theECAP signals.

Example 7A. The method of example 4A, further comprising: responsive tothe comparison that the at least one characteristic value is outside thethreshold of the at least one characteristic value of the baseline ECAPsignal, determining, by the processing circuitry, the at least onecharacteristic value of the one or more ECAP signals comprises noise;performing the lead integrity test for the at least one electrodecarried by the medical lead; determining, by the processing circuitryand based on the lead integrity test, the at least one electrode iswithin one or more thresholds defined by stored instructions; responsiveto the lead integrity test, suspending, by the processing circuitry,closed-loop stimulation;

periodically comparing, by the processing circuitry, the at least onecharacteristic value of the one or more ECAP signals against at leastone characteristic value of the baseline ECAP signal; and responsive tothe comparison of the at least one characteristic value of the one ormore ECAP signals being within the expected range of the at least onecharacteristic value of the baseline ECAP signals, resuming, by theprocessing circuitry, the closed-loop stimulation.

Example 8A. The method of example 4A, wherein the at least one electrodecomprises a first recording electrode combination, and wherein themethod further comprises: responsive to the comparison that the at leastone characteristic value is outside the expected range from the at leastone characteristic value of the baseline ECAP signal, determining, bythe processing circuitry, the at least one characteristic value of theone or more ECAP signals comprises noise; performing the lead integritytest for the at least one electrode carried by the medical lead;responsive to lead integrity test, determining, by the processingcircuitry, the lead integrity test of the first recording electrodecombination is not within one or more thresholds defined by storedinstructions; and responsive to the determination the first recordingelectrode combination is not within the one or more thresholds definedby the stored instructions, selecting, by the processing circuitry, asecond recording electrode combination.

Example 9A. The method of any of examples 1A through 8A, furthercomprising: determining, by the processing circuitry, over a period oftime the characteristic value of the one or more ECAP signals is avariance of the one or more ECAP signals; and responsive to thedetermination of the variance between the characteristic value and theone or more ECAP signals, periodically comparing, by the processingcircuitry, the at least one characteristic value of the one or more ECAPsignals against the at least one characteristic value of the baselineECAP signal.

Example 10A. The method of example 9A, further comprising: responsive toa comparison of the at least one characteristic value of the one or moreECAP signals being outside the expected range of the at least onecharacteristic value of the baseline ECAP signals, performing the leadintegrity test for the at least one electrode carried by the medicallead; determining, by the processing circuitry, the lead integrity testis within limits defined by stored instructions; suspending, by theprocessing circuitry, closed-loop stimulation; periodically comparing,by the processing circuitry, the at least one characteristic value ofthe one or more ECAP signals against at least one characteristic valueof the baseline ECAP signal; and resuming, by the processing circuitryand based upon the at least one characteristic value of the one or moreECAP signals within the expected range of the at least onecharacteristic value of the baseline ECAP signal, closed-loopstimulation.

Example 1B. A medical device comprising: stimulation generationcircuitry configured to deliver a first stimulation pulse to a patient;sensing circuitry configured to sense information indicative of one ormore evoked compound action potential (ECAP) signals, where the sensingcircuitry comprises at least one electrode carried by a medical lead;and processing circuitry configured to: receive information indicativeof the one or more ECAP signals sensed by the at least one electrodecarried by the medical lead; determine that at least one characteristicvalue of the one or more ECAP signals is outside of an expected range;and responsive to determining that the at least one characteristic valueof the one or more ECAP signals is outside of the expected range,perform a lead integrity test for the medical lead.

Example 2B. The medical device of example 1B, wherein the processingcircuitry is further configured to: receive accelerometer dataindicative of patient movement; determine, based on the accelerometerdata, that a circadian rhythm of a patient is within a normal circadianrhythm range; determine the at least one characteristic value of the oneor more ECAP signals is below the expected range; and responsive todetermining that the circadian rhythm is within the normal circadianrhythm range and the characteristic value of the one or more ECAPsignals is below the expected range, performing the lead integrity test.

Example 3B. The medical device of example 2B, wherein the lead integritytest comprises measuring an impedance for the at least one electrodecarried by the medical lead and determining whether the measuredimpedance is within limits defined by stored instructions.

Example 4B. The medical device of any of examples 1B through 3B, whereinthe medical device comprises an implantable medical device comprisingthe stimulation generation circuitry, the sensing circuitry, and theprocessing circuitry.

Example 5B. The medical device of any of examples 1B through 4B, whereinthe processing circuitry is further configured to: determine that the atleast one characteristic value of the one or more ECAP signals is anamplitude above the expected range; compare the at least onecharacteristic value of the one or more ECAP signals to the at least onecharacteristic value of a baseline ECAP signal; and determine, based onthe comparison, that the at least one characteristic value is outside anexpected range of the at least one characteristic value of the baselineECAP signal.

Example 6B. The medical device of example 5B, wherein the processingcircuitry is further configured to: perform, based on a determinationthe at least one characteristic value is outside the expected range fromthe at least one characteristic value of the baseline ECAP signal, thelead integrity test that comprises measuring an impedance for the atleast one electrode carried by the medical lead and determining whetherthe measured impedance is within limits defined by stored instructions;determine, based on the lead integrity test results, that the medicallead measured impedance is within the limits defined by the storedinstructions; and output a request for a user to adjust a closed-loopstimulation algorithm that controls delivery of electrical stimulationbased on the ECAP signals responsive.

Example 7B. The medical device of example 5B, wherein the processingcircuitry is further configured to: perform, based on determining thatthe at least one characteristic value is outside the expected range fromthe at least one characteristic value of the baseline ECAP signal, thelead integrity test that comprises measuring an impedance for the atleast one electrode carried by the medical lead; determine, based on thelead integrity test results, that the at least one electrode of themedical lead failed the lead integrity test; and request a user toadjust a closed-loop stimulation algorithm that controls delivery ofelectrical stimulation based on the ECAP signals.

Example 8B. The medical device of example 5B, wherein the processingcircuitry is further configured to: determine, based on the comparisonthat the at least one characteristic value is outside the expected rangeof the at least one characteristic value of the baseline ECAP signal,the at least one characteristic value of the one or more ECAP signalscomprises noise; perform the lead integrity test for the at least oneelectrode carried by the medical lead; determine, based on the leadintegrity test, the at least one electrode is within one or morethresholds defined by stored instructions; suspend, based on the leadintegrity test, closed-loop stimulation; periodically compare the atleast one characteristic value of the one or more ECAP signals againstat least one characteristic value of the baseline ECAP signal; andresume, based on the comparison of the at least one characteristic valueof the one or more ECAP signals being within the expected range of theat least one characteristic value of the baseline ECAP signals, theclosed-loop stimulation.

Example 9B. The medical device of example 5B, wherein the at least oneelectrode comprises at least one recording electrode, and wherein theprocessing circuitry is further configured to: determine, based on thecomparison that the at least one characteristic value is outside theexpected range from the at least one characteristic value of thebaseline ECAP signal, the at least one characteristic value of the oneor more ECAP signals comprises noise; perform the lead integrity testfor the at least one electrode carried by the medical lead; determine,based on the lead integrity test, the first recording electrodecombination is not within one or more thresholds defined by storedinstructions; and select, based on the determination the first recordingelectrode combination is not within the one or more thresholds definedby the stored instructions, a second recording electrode combination.

Example 1C. A computer-readable storage medium comprising instructionsthat, when executed, cause processing circuitry to: receive informationindicative of one or more evoked compound action potential (ECAP)signals, the one or more ECAP signals sensed by at least one electrodecarried by a medical lead; determine that at least one characteristicvalue of the one or more ECAP signals is outside of an expected range;and perform, based on the determination that the at least onecharacteristic value of the one or more ECAP signals is outside of theexpected range, a lead integrity test for the medical lead.

The techniques described in this disclosure may be implemented, at leastin part, in hardware, software, firmware, or any combination thereof.For example, various aspects of the techniques may be implemented withinone or more microprocessors, DSPs, ASICs, FPGAs, or any other equivalentintegrated or discrete logic QRS circuitry, as well as any combinationsof such components, embodied in external devices, such as physician orpatient programmers, stimulators, or other devices. The terms“processor” and “processing circuitry” may generally refer to any of theforegoing logic circuitry, alone or in combination with other logiccircuitry, or any other equivalent circuitry, and alone or incombination with other digital or analog circuitry.

For aspects implemented in software, at least some of the functionalityascribed to the systems and devices described in this disclosure may beembodied as instructions on a computer-readable storage medium such asRAM, DRAM, SRAM, magnetic discs, optical discs, flash memories, or formsof EPROM or EEPROM. The instructions may be executed to support one ormore aspects of the functionality described in this disclosure.

In addition, in some aspects, the functionality described herein may beprovided within dedicated hardware and/or software modules. Depiction ofdifferent features as modules or units may be intended to highlightdifferent functional aspects and does not necessarily imply that suchmodules or units must be realized by separate hardware or softwarecomponents. Rather, functionality associated with one or more modules orunits may be performed by separate hardware or software components orintegrated within common or separate hardware or software components.Also, the techniques may be fully implemented in one or more circuits orlogic elements. The techniques of this disclosure may be implemented ina wide variety of devices or apparatuses, including an IMD, an externalprogrammer, a combination of an IMD and external programmer, anintegrated circuit (IC) or a set of ICs, and/or discrete electricalcircuitry, residing in an IMD and/or external programmer.

What is claimed is:
 1. A method comprising: receiving, by processingcircuitry, information indicative of one or more evoked compound actionpotential (ECAP) signals, the one or more ECAP signals sensed by atleast one electrode carried by a medical lead; receiving, by theprocessing circuitry, accelerometer data indicative of patient movement;determining, by processing circuitry and based on the accelerometerdata, that at least one characteristic value of the one or more ECAPsignals is outside of an expected range; and responsive to determiningthat the at least one characteristic value of the one or more ECAPsignals is outside of the expected range, performing, by the processingcircuitry, an action.
 2. The method of claim 1, further comprising:determining, by the processing circuitry and based on the accelerometerdata, that a circadian rhythm of a patient is within a normal circadianrhythm range; determining, by the processing circuitry, the at least onecharacteristic value of the one or more ECAP signals is below theexpected range; and responsive to determining that the circadian rhythmis within the normal circadian rhythm range and the characteristic valueof the one or more ECAP signals is below the expected range, performingthe action.
 3. The method of claim 2, wherein the action comprises alead integrity test, and wherein performing the lead integrity testfurther comprises performing the lead integrity test by at leastmeasuring an impedance for the at least one electrode carried by themedical lead and determining whether the measured impedance is withinone or more thresholds defined by stored instructions.
 4. The method ofclaim 1, further comprising: determining, by the processing circuitry,that the at least one characteristic value of the one or more ECAPsignals is an amplitude above the expected range; comparing, by theprocessing circuitry, the at least one characteristic value of the oneor more ECAP signals to at least one characteristic value of a baselineECAP signal; and determining, by the processing circuitry, based on thecomparison, that the at least one characteristic value of the one ormore ECAP signals is outside of an expected range of the at least onecharacteristic value of the baseline ECAP signal.
 5. The method of claim4, further comprising: responsive to a determination the at least onecharacteristic value is outside the expected range from the at least onecharacteristic value of the baseline ECAP signal, performing, as theaction, a lead integrity test that comprises measuring an impedance forthe at least one electrode carried by the medical lead; determining, bythe processing circuitry and based on lead integrity test results, thatthe measured impedance of the at least one electrode is within one ormore thresholds defined by stored instructions; and outputting, by theprocessing circuitry based on a successful lead integrity test, arequest for a user to adjust a closed-loop stimulation algorithm thatcontrols delivery of electrical stimulation based on the ECAP signals.6. The method of claim 4, further comprising: responsive to determiningthat the at least one characteristic value of the one or more ECAPsignals is outside the expected range of the at least one characteristicvalue of the baseline ECAP signal, performing, as the action, a leadintegrity test; determining, by the processor and based on the leadintegrity test, that impedance measured at the at least one electrode ofthe medical lead is outside one or more thresholds defined by storedinstructions; and responsive to the at least one electrode of themedical lead failing the lead integrity test, requesting, by theprocessing circuitry, a user to adjust a closed-loop stimulationalgorithm that controls delivery of electrical stimulation based on theECAP signals.
 7. The method of claim 1, further comprising: determining,by the processing circuitry, over a period of time the characteristicvalue of the one or more ECAP signals is a variance of the one or moreECAP signals; and responsive to the determination of the variancebetween the characteristic value and the one or more ECAP signals,periodically comparing, by the processing circuitry, the at least onecharacteristic value of the one or more ECAP signals against the atleast one characteristic value of the baseline ECAP signal.
 8. Themethod of claim 7, further comprising: responsive to a comparison of theat least one characteristic value of the one or more ECAP signals beingoutside the expected range of the at least one characteristic value ofthe baseline ECAP signals, performing a lead integrity test as theaction for the at least one electrode carried by the medical lead;determining, by the processing circuitry, the lead integrity test iswithin limits defined by stored instructions; suspending, by theprocessing circuitry, closed-loop stimulation; periodically comparing,by the processing circuitry, the at least one characteristic value ofthe one or more ECAP signals against at least one characteristic valueof the baseline ECAP signal; and resuming, by the processing circuitryand based upon the at least one characteristic value of the one or moreECAP signals within the expected range of the at least onecharacteristic value of the baseline ECAP signal, closed-loopstimulation.
 9. The method of claim 1, wherein performing the actioncomprises suspending closed-loop adjustment of one or more parametersthat define electrical stimulation therapy delivered to a patient. 10.The method of claim 1, wherein performing the action comprisesreconfiguring at least one of a stimulation electrode combination or asensing electrode combination.
 11. A medical device comprising:stimulation generation circuitry configured to deliver a firststimulation pulse to a patient; sensing circuitry configured to senseinformation indicative of one or more evoked compound action potential(ECAP) signals, where the sensing circuitry comprises at least oneelectrode carried by a medical lead; and processing circuitry configuredto: receive information indicative of the one or more ECAP signalssensed by the at least one electrode carried by the medical lead;receive accelerometer data indicative of patient movement; determine,based on the accelerometer data, that at least one characteristic valueof the one or more ECAP signals is outside of an expected range; andresponsive to determining that the at least one characteristic value ofthe one or more ECAP signals is outside of the expected range, performan action.
 12. The medical device of claim 11, wherein the processingcircuitry is further configured to: determine, based on theaccelerometer data, that a circadian rhythm of a patient is within anormal circadian rhythm range; determine the at least one characteristicvalue of the one or more ECAP signals is below the expected range; andresponsive to determining that the circadian rhythm is within the normalcircadian rhythm range and the characteristic value of the one or moreECAP signals is below the expected range, performing the action.
 13. Themedical device of claim 12, wherein the action comprises a leadintegrity test, and wherein performing the processing circuitry isconfigured to perform the lead integrity test by at least measuring animpedance for the at least one electrode carried by the medical lead anddetermining whether the measured impedance is within limits defined bystored instructions.
 14. The medical device of claim 11, wherein themedical device comprises an implantable medical device comprising thestimulation generation circuitry, the sensing circuitry, and theprocessing circuitry.
 15. The medical device of claim 11, wherein theprocessing circuitry is further configured to: determine that the atleast one characteristic value of the one or more ECAP signals is anamplitude above the expected range; compare the at least onecharacteristic value of the one or more ECAP signals to the at least onecharacteristic value of a baseline ECAP signal; and determine, based onthe comparison, that the at least one characteristic value is outside anexpected range of the at least one characteristic value of the baselineECAP signal.
 16. The medical device of claim 15, wherein the processingcircuitry is further configured to: perform, based on a determinationthe at least one characteristic value is outside the expected range fromthe at least one characteristic value of the baseline ECAP signal, alead integrity test, as the action, that comprises measuring animpedance for the at least one electrode carried by the medical lead anddetermining whether the measured impedance is within limits defined bystored instructions; determine, based on the lead integrity testresults, that the medical lead measured impedance is within the limitsdefined by the stored instructions; and output a request for a user toadjust a closed-loop stimulation algorithm that controls delivery ofelectrical stimulation based on the ECAP signals responsive.
 17. Themedical device of claim 15, wherein the processing circuitry is furtherconfigured to: perform, based on determining that the at least onecharacteristic value is outside the expected range from the at least onecharacteristic value of the baseline ECAP signal, a lead integrity test,as the action, that comprises measuring an impedance for the at leastone electrode carried by the medical lead; determine, based on the leadintegrity test results, that the at least one electrode of the medicallead failed the lead integrity test; and request a user to adjust aclosed-loop stimulation algorithm that controls delivery of electricalstimulation based on the ECAP signals.
 18. The medical device of claim11, wherein the processing circuitry is configured to perform the actionby at least suspending closed-loop adjustment of one or more parametersthat define electrical stimulation therapy delivered to a patient. 19.The medical device of claim 11, wherein the processing circuitry isconfigured to perform the action by at least reconfiguring at least oneof a stimulation electrode combination or a sensing electrodecombination.
 20. A computer-readable storage medium comprisinginstructions that, when executed, cause processing circuitry to: receiveinformation indicative of one or more evoked compound action potential(ECAP) signals, the one or more ECAP signals sensed by at least oneelectrode carried by a medical lead; determine that at least onecharacteristic value of the one or more ECAP signals is outside of anexpected range; receive accelerometer data indicative of patientmovement; determine, based on the accelerometer data, that a circadianrhythm of a patient is within a normal circadian rhythm range; andresponsive to determining that the circadian rhythm is within the normalcircadian rhythm range and the characteristic value of the one or moreECAP signals is outside of the expected range, perform an action.